mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 17:24:58 +02: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)
|
||||
|
||||
@@ -129,7 +129,7 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
assert_greater_than(res['size_on_disk'], 0)
|
||||
|
||||
assert_equal(res['softforks'], {
|
||||
'bip34': {'type': 'buried', 'active': False, 'height': 500},
|
||||
'bip34': {'type': 'buried', 'active': True, 'height': 2},
|
||||
'bip66': {'type': 'buried', 'active': False, 'height': 1251},
|
||||
'bip65': {'type': 'buried', 'active': False, 'height': 1351},
|
||||
'csv': {'type': 'buried', 'active': False, 'height': 432},
|
||||
|
||||
Reference in New Issue
Block a user