From: Richard Smith Date: Wed, 20 Jun 2012 21:22:42 +0000 (+0100) Subject: PPCoin: Force asking for orphan block's parent block X-Git-Tag: v0.4.0-unstable~148 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=851fe4f82c9400ced6d58f6f279bc01539d8a1f9 PPCoin: Force asking for orphan block's parent block Fix an issue where a block previously failing duplicate proof-of-stake check was not asked for again --- diff --git a/src/main.cpp b/src/main.cpp index 127ca29..4e27d4b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1674,7 +1674,13 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock) // Ask this guy to fill in what we're missing if (pfrom) + { pfrom->PushGetBlocks(pindexBest, GetOrphanRoot(pblock2)); + // ppcoin: getblocks may not obtain the parent block rejected earlier + // by duplicate-stake check so we must ask for it again directly + if (!mapOrphanBlocks.count(pblock->hashPrevBlock)) + pfrom->AskFor(CInv(MSG_BLOCK, pblock->hashPrevBlock)); + } return true; }