diff options
author | Matt Corallo <git@bluematt.me> | 2017-10-11 16:04:13 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-11-02 13:20:53 -0400 |
commit | 51001d684b1b26ea5109986b7317ffe24bf71b43 (patch) | |
tree | 28ea95b7324d688fff13fd90a678800a49857a31 /test | |
parent | c6e4d0ce82cfd9fb775ba5ca5874af207585837b (diff) | |
download | bitcoin-51001d684b1b26ea5109986b7317ffe24bf71b43.tar.xz |
Accept unrequested blocks with work equal to our tip
This is a simple change that makes our accept requirements the
same as our request requirements, (ever so slightly) further
decoupling our consensus logic from our FindNextBlocksToDownload
logic in net_processing.
Github-Pull: #11531
Rebased-From: 932f118e6a3779bb3d6c3cc83963cf34ac150e42
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/p2p-acceptblock.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/functional/p2p-acceptblock.py b/test/functional/p2p-acceptblock.py index 9b2c1a73fc..36e0bd9ec6 100755 --- a/test/functional/p2p-acceptblock.py +++ b/test/functional/p2p-acceptblock.py @@ -142,8 +142,7 @@ class AcceptBlockTest(BitcoinTestFramework): assert(tip_entry_found) # But this block should be accepted by node since it has equal work. - # TODO: We currently drop this block but likely shouldn't - #self.nodes[0].getblock(block_h2f.hash) + self.nodes[0].getblock(block_h2f.hash) self.log.info("Second height 2 block accepted, but not reorg'ed to") # 4b. Now send another block that builds on the forking chain. @@ -215,7 +214,6 @@ class AcceptBlockTest(BitcoinTestFramework): test_node.wait_for_verack() test_node.send_message(msg_block(block_h1f)) - test_node.send_message(msg_block(block_h2f)) # This should not be required test_node.sync_with_ping() assert_equal(self.nodes[0].getblockcount(), 2) @@ -239,7 +237,6 @@ class AcceptBlockTest(BitcoinTestFramework): # 7. Send the missing block for the third time (now it is requested) test_node.send_message(msg_block(block_h1f)) - test_node.send_message(msg_block(block_h2f)) # This should not be required test_node.sync_with_ping() assert_equal(self.nodes[0].getblockcount(), 290) |