aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_block.py
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2019-01-16 13:11:13 +1000
committerSuhas Daftuar <sdaftuar@gmail.com>2019-05-02 14:55:13 -0400
commit34477ccd39a8d4bfa8ad612f22d5a46291922185 (patch)
treecb10c04ca46dc532d59d8da2c5ca797e54093b9e /test/functional/feature_block.py
parent6a7f8777a0b193fae4f976196f3464ffac01bf1b (diff)
[refactor] Add useful-for-dos "reason" field to CValidationState
This is a first step towards cleaning up our DoS interface - make validation return *why* something is invalid, and let net_processing figure out what that implies in terms of banning/disconnection/etc. Behavior change: peers will now be banned for providing blocks with premature coinbase spends. Co-authored-by: Anthony Towns <aj@erisian.com.au> Suhas Daftuar <sdaftuar@gmail.com>
Diffstat (limited to 'test/functional/feature_block.py')
-rwxr-xr-xtest/functional/feature_block.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py
index 9e00e2d23c..9a9424b82b 100755
--- a/test/functional/feature_block.py
+++ b/test/functional/feature_block.py
@@ -295,7 +295,7 @@ class FullBlockTest(BitcoinTestFramework):
self.log.info("Reject a block spending an immature coinbase.")
self.move_tip(15)
b20 = self.next_block(20, spend=out[7])
- self.send_blocks([b20], success=False, reject_reason='bad-txns-premature-spend-of-coinbase')
+ self.send_blocks([b20], success=False, reject_reason='bad-txns-premature-spend-of-coinbase', reconnect=True)
# Attempt to spend a coinbase at depth too low (on a fork this time)
# genesis -> b1 (0) -> b2 (1) -> b5 (2) -> b6 (3)
@@ -308,7 +308,7 @@ class FullBlockTest(BitcoinTestFramework):
self.send_blocks([b21], False)
b22 = self.next_block(22, spend=out[5])
- self.send_blocks([b22], success=False, reject_reason='bad-txns-premature-spend-of-coinbase')
+ self.send_blocks([b22], success=False, reject_reason='bad-txns-premature-spend-of-coinbase', reconnect=True)
# Create a block on either side of MAX_BLOCK_BASE_SIZE and make sure its accepted/rejected
# genesis -> b1 (0) -> b2 (1) -> b5 (2) -> b6 (3)