Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-minimaldata.py
Show All 9 Lines | |||||
on the other side of the upgrade. | on the other side of the upgrade. | ||||
Derived from abc-schnorr.py | Derived from abc-schnorr.py | ||||
""" | """ | ||||
from test_framework.blocktools import ( | from test_framework.blocktools import ( | ||||
create_block, | create_block, | ||||
create_coinbase, | create_coinbase, | ||||
create_transaction, | create_tx_with_script, | ||||
make_conform_to_ctor, | make_conform_to_ctor, | ||||
) | ) | ||||
from test_framework.messages import ( | from test_framework.messages import ( | ||||
CBlock, | CBlock, | ||||
COutPoint, | COutPoint, | ||||
CTransaction, | CTransaction, | ||||
CTxIn, | CTxIn, | ||||
CTxOut, | CTxOut, | ||||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
def create_fund_and_spend_tx(): | def create_fund_and_spend_tx(): | ||||
spendfrom = spendable_outputs.pop() | spendfrom = spendable_outputs.pop() | ||||
script = CScript([OP_ADD]) | script = CScript([OP_ADD]) | ||||
value = spendfrom.vout[0].nValue | value = spendfrom.vout[0].nValue | ||||
# Fund transaction | # Fund transaction | ||||
txfund = create_transaction(spendfrom, 0, b'', value, script) | txfund = create_tx_with_script(spendfrom, 0, b'', value, script) | ||||
txfund.rehash() | txfund.rehash() | ||||
fundings.append(txfund) | fundings.append(txfund) | ||||
# Spend transaction | # Spend transaction | ||||
txspend = CTransaction() | txspend = CTransaction() | ||||
txspend.vout.append( | txspend.vout.append( | ||||
CTxOut(value - 1000, CScript([OP_TRUE]))) | CTxOut(value - 1000, CScript([OP_TRUE]))) | ||||
txspend.vin.append( | txspend.vin.append( | ||||
Show All 33 Lines |