Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_block.py
Show First 20 Lines • Show All 693 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# Test BIP30 (reject duplicate) | # Test BIP30 (reject duplicate) | ||||
# | # | ||||
# -> b39 (11) -> b42 (12) -> b43 (13) -> b53 (14) -> b55 (15) -> b57 (16) -> b60 () | # -> b39 (11) -> b42 (12) -> b43 (13) -> b53 (14) -> b55 (15) -> b57 (16) -> b60 () | ||||
# \-> b61 () | # \-> b61 () | ||||
# | # | ||||
# Blocks are not allowed to contain a transaction whose id matches that of an earlier, | # Blocks are not allowed to contain a transaction whose id matches that of an earlier, | ||||
# not-fully-spent transaction in the same chain. To test, make identical coinbases; | # not-fully-spent transaction in the same chain. To test, make identical coinbases; | ||||
# the second one should be rejected. | # the second one should be rejected. See also CVE-2012-1909. | ||||
# | # | ||||
self.log.info( | self.log.info( | ||||
"Reject a block with a transaction with a duplicate hash of a previous transaction (BIP30)") | "Reject a block with a transaction with a duplicate hash of a previous transaction (BIP30)") | ||||
self.move_tip(60) | self.move_tip(60) | ||||
b61 = self.next_block(61) | b61 = self.next_block(61) | ||||
b61.vtx[0].vin[0].scriptSig = DUPLICATE_COINBASE_SCRIPT_SIG | b61.vtx[0].vin[0].scriptSig = DUPLICATE_COINBASE_SCRIPT_SIG | ||||
b61.vtx[0].rehash() | b61.vtx[0].rehash() | ||||
b61 = self.update_block(61, []) | b61 = self.update_block(61, []) | ||||
▲ Show 20 Lines • Show All 592 Lines • Show Last 20 Lines |