Be stricter in processing unrequested blocks
AcceptBlock will no longer process an unrequested block, unless it has not been previously processed and has more work than chainActive.Tip() Github-Pull: #5875 Rebased-From: 9be0e6837b878f72bd087ce32b7a2f2ffb2fd544
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
666e973b2f
commit
304892fc03
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
|
||||
pblock->hashMerkleRoot = pblock->BuildMerkleTree();
|
||||
pblock->nNonce = blockinfo[i].nonce;
|
||||
CValidationState state;
|
||||
BOOST_CHECK(ProcessNewBlock(state, NULL, pblock));
|
||||
BOOST_CHECK(ProcessNewBlock(state, NULL, pblock, true, NULL));
|
||||
BOOST_CHECK(state.IsValid());
|
||||
pblock->hashPrevBlock = pblock->GetHash();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user