Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_cltv.py
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
self.nodes[0].testmempoolaccept( | self.nodes[0].testmempoolaccept( | ||||
rawtxs=[spendtx.serialize().hex()], allowhighfees=True) | rawtxs=[spendtx.serialize().hex()], allowhighfees=True) | ||||
) | ) | ||||
rejectedtx_signed = self.nodes[0].signrawtransactionwithwallet( | rejectedtx_signed = self.nodes[0].signrawtransactionwithwallet( | ||||
ToHex(spendtx)) | ToHex(spendtx)) | ||||
# Couldn't complete signature due to CLTV | # Couldn't complete signature due to CLTV | ||||
assert(rejectedtx_signed['errors'][0]['error'] == 'Negative locktime') | assert rejectedtx_signed['errors'][0]['error'] == 'Negative locktime' | ||||
tip = block.hash | tip = block.hash | ||||
block_time += 1 | block_time += 1 | ||||
block = create_block( | block = create_block( | ||||
block.sha256, create_coinbase(CLTV_HEIGHT+1), block_time) | block.sha256, create_coinbase(CLTV_HEIGHT+1), block_time) | ||||
block.nVersion = 4 | block.nVersion = 4 | ||||
block.vtx.append(spendtx) | block.vtx.append(spendtx) | ||||
block.hashMerkleRoot = block.calc_merkle_root() | block.hashMerkleRoot = block.calc_merkle_root() | ||||
Show All 37 Lines |