Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_bip68_sequence.py
Show First 20 Lines • Show All 397 Lines • ▼ Show 20 Lines | def test_sequence_lock_unconfirmed_inputs(self): | ||||
# Reset the chain and get rid of the mocktimed-blocks | # Reset the chain and get rid of the mocktimed-blocks | ||||
self.nodes[0].setmocktime(0) | self.nodes[0].setmocktime(0) | ||||
self.nodes[0].invalidateblock( | self.nodes[0].invalidateblock( | ||||
self.nodes[0].getblockhash(cur_height + 1)) | self.nodes[0].getblockhash(cur_height + 1)) | ||||
self.nodes[0].generate(10) | self.nodes[0].generate(10) | ||||
def get_csv_status(self): | def get_csv_status(self): | ||||
softforks = self.nodes[0].getblockchaininfo()['softforks'] | height = self.nodes[0].getblockchaininfo()['blocks'] | ||||
for sf in softforks: | return height >= 576 | ||||
if sf['id'] == 'csv' and sf['version'] == 5: | |||||
return sf['reject']['status'] | |||||
raise AssertionError('Cannot find CSV fork activation information') | |||||
# Make sure that BIP68 isn't being used to validate blocks, prior to | # Make sure that BIP68 isn't being used to validate blocks, prior to | ||||
# versionbits activation. If more blocks are mined prior to this test | # versionbits activation. If more blocks are mined prior to this test | ||||
# being run, then it's possible the test has activated the soft fork, and | # being run, then it's possible the test has activated the soft fork, and | ||||
# this test should be moved to run earlier, or deleted. | # this test should be moved to run earlier, or deleted. | ||||
def test_bip68_not_consensus(self): | def test_bip68_not_consensus(self): | ||||
assert_equal(self.get_csv_status(), False) | assert_equal(self.get_csv_status(), False) | ||||
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2) | txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 2) | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |