Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_cltv.py
Show All 27 Lines | from test_framework.script import ( | ||||
OP_TRUE, | OP_TRUE, | ||||
) | ) | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.txtools import pad_tx | from test_framework.txtools import pad_tx | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
CLTV_HEIGHT = 1351 | CLTV_HEIGHT = 1351 | ||||
# Reject codes that we might receive in this test | |||||
REJECT_OBSOLETE = 17 | |||||
def cltv_lock_to_height(node, tx, to_address, amount, height=-1): | def cltv_lock_to_height(node, tx, to_address, amount, height=-1): | ||||
'''Modify the scriptPubKey to add an OP_CHECKLOCKTIMEVERIFY, and make | '''Modify the scriptPubKey to add an OP_CHECKLOCKTIMEVERIFY, and make | ||||
a transaction that spends it. | a transaction that spends it. | ||||
This transforms the output script to anyone can spend (OP_TRUE) if the | This transforms the output script to anyone can spend (OP_TRUE) if the | ||||
lock time condition is valid. | lock time condition is valid. | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |