mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 19:53:27 +01:00
test: Set BIP34Height = 2 for regtest
This commit is contained in:
@@ -373,7 +373,9 @@ class FullBlockTest(BitcoinTestFramework):
|
||||
# b30 has a max-sized coinbase scriptSig.
|
||||
self.move_tip(23)
|
||||
b30 = self.next_block(30)
|
||||
b30.vtx[0].vin[0].scriptSig = b'\x00' * 100
|
||||
b30.vtx[0].vin[0].scriptSig = bytes(b30.vtx[0].vin[0].scriptSig) # Convert CScript to raw bytes
|
||||
b30.vtx[0].vin[0].scriptSig += b'\x00' * (100 - len(b30.vtx[0].vin[0].scriptSig)) # Fill with 0s
|
||||
assert_equal(len(b30.vtx[0].vin[0].scriptSig), 100)
|
||||
b30.vtx[0].rehash()
|
||||
b30 = self.update_block(30, [])
|
||||
self.send_blocks([b30], True)
|
||||
@@ -817,6 +819,7 @@ class FullBlockTest(BitcoinTestFramework):
|
||||
b61.vtx[0].rehash()
|
||||
b61 = self.update_block(61, [])
|
||||
assert_equal(duplicate_tx.serialize(), b61.vtx[0].serialize())
|
||||
# BIP30 is always checked on regtest, regardless of the BIP34 activation height
|
||||
self.send_blocks([b61], success=False, reject_reason='bad-txns-BIP30', reconnect=True)
|
||||
|
||||
# Test BIP30 (allow duplicate if spent)
|
||||
|
||||
Reference in New Issue
Block a user