Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_cltv.py
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | def cltv_lock_to_height(node, tx, to_address, amount, height=-1): | ||||
pad_tx(tx) | pad_tx(tx) | ||||
fundtx_raw = node.signrawtransactionwithwallet(ToHex(tx))['hex'] | fundtx_raw = node.signrawtransactionwithwallet(ToHex(tx))['hex'] | ||||
fundtx = FromHex(CTransaction(), fundtx_raw) | fundtx = FromHex(CTransaction(), fundtx_raw) | ||||
fundtx.rehash() | fundtx.rehash() | ||||
# make spending tx | # make spending tx | ||||
from_txid = fundtx.hash | |||||
inputs = [{ | inputs = [{ | ||||
"txid": fundtx.hash, | "txid": fundtx.hash, | ||||
"vout": 0 | "vout": 0 | ||||
}] | }] | ||||
output = {to_address: amount} | output = {to_address: amount} | ||||
spendtx_raw = node.createrawtransaction(inputs, output) | spendtx_raw = node.createrawtransaction(inputs, output) | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |