Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-minimaldata-activation.py
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
# Fund transaction | # Fund transaction | ||||
txfund = create_transaction(spendfrom, 0, b'', value, script) | txfund = create_transaction(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( | ||||
CTxIn(COutPoint(txfund.sha256, 0), b'')) | CTxIn(COutPoint(txfund.sha256, 0), b'')) | ||||
# Sign the transaction | # Sign the transaction | ||||
txspend.vin[0].scriptSig = CScript( | txspend.vin[0].scriptSig = CScript( | ||||
b'\x01\x01\x51') # PUSH1(0x01) OP_1 | b'\x01\x01\x51') # PUSH1(0x01) OP_1 | ||||
pad_tx(txspend) | pad_tx(txspend) | ||||
txspend.rehash() | txspend.rehash() | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |