aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2017-02-13 17:28:39 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2017-02-15 08:17:57 -0500
commitba803efb687c2cb408176c546a544a8466c652ea (patch)
treec7659cde7bfce8c021c27f762bcb7a0d88b88df2 /qa
parent1c2edd9f6707d16c03ecfba094b1cfec2ddc4dce (diff)
downloadbitcoin-ba803efb687c2cb408176c546a544a8466c652ea.tar.xz
Harden against mistakes handling invalid blocks
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect arguments, and restores a call to CheckBlock() from ProcessNewBlock() as belt-and-suspenders. Updates the (overspecified) tests to match behavior.
Diffstat (limited to 'qa')
-rwxr-xr-xqa/rpc-tests/p2p-fullblocktest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/rpc-tests/p2p-fullblocktest.py b/qa/rpc-tests/p2p-fullblocktest.py
index e4b889d761..44e5f10322 100755
--- a/qa/rpc-tests/p2p-fullblocktest.py
+++ b/qa/rpc-tests/p2p-fullblocktest.py
@@ -398,7 +398,7 @@ class FullBlockTest(ComparisonTestFramework):
# Extend the b26 chain to make sure bitcoind isn't accepting b26
b27 = block(27, spend=out[7])
- yield rejected(RejectResult(16, b'bad-prevblk'))
+ yield rejected(RejectResult(0, b'bad-prevblk'))
# Now try a too-large-coinbase script
tip(15)
@@ -410,7 +410,7 @@ class FullBlockTest(ComparisonTestFramework):
# Extend the b28 chain to make sure bitcoind isn't accepting b28
b29 = block(29, spend=out[7])
- yield rejected(RejectResult(16, b'bad-prevblk'))
+ yield rejected(RejectResult(0, b'bad-prevblk'))
# b30 has a max-sized coinbase scriptSig.
tip(23)