Changeset View
Changeset View
Standalone View
Standalone View
test/functional/chronik_tx.py
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
)], | )], | ||||
outputs=[pb.TxOutput( | outputs=[pb.TxOutput( | ||||
value=value, | value=value, | ||||
output_script=bytes(script), | output_script=bytes(script), | ||||
) for value, script in zip(send_values, send_scripts)], | ) for value, script in zip(send_values, send_scripts)], | ||||
lock_time=1234567890, | lock_time=1234567890, | ||||
block=None, | block=None, | ||||
time_first_seen=1333333337, | time_first_seen=1333333337, | ||||
size=len(tx.serialize()), | |||||
is_coinbase=False, | is_coinbase=False, | ||||
) | ) | ||||
assert_equal(chronik.tx(txid).ok(), proto_tx) | assert_equal(chronik.tx(txid).ok(), proto_tx) | ||||
# If we mine the block, querying will gives us all the tx details + block | # If we mine the block, querying will gives us all the tx details + block | ||||
txblockhash = self.generatetoaddress(node, 1, ADDRESS_ECREG_UNSPENDABLE)[0] | txblockhash = self.generatetoaddress(node, 1, ADDRESS_ECREG_UNSPENDABLE)[0] | ||||
Show All 33 Lines | def run_test(self): | ||||
], | ], | ||||
outputs=[pb.TxOutput( | outputs=[pb.TxOutput( | ||||
value=tx2.vout[0].nValue, | value=tx2.vout[0].nValue, | ||||
output_script=bytes(tx2.vout[0].scriptPubKey), | output_script=bytes(tx2.vout[0].scriptPubKey), | ||||
)], | )], | ||||
lock_time=12, | lock_time=12, | ||||
block=None, | block=None, | ||||
time_first_seen=1333333338, | time_first_seen=1333333338, | ||||
size=len(tx2.serialize()), | |||||
is_coinbase=False, | is_coinbase=False, | ||||
) | ) | ||||
assert_equal(chronik.tx(txid2).ok(), proto_tx2) | assert_equal(chronik.tx(txid2).ok(), proto_tx2) | ||||
# Mine tx | # Mine tx | ||||
tx2blockhash = self.generatetoaddress(node, 1, ADDRESS_ECREG_UNSPENDABLE)[0] | tx2blockhash = self.generatetoaddress(node, 1, ADDRESS_ECREG_UNSPENDABLE)[0] | ||||
# Invalidate block | # Invalidate block | ||||
Show All 32 Lines |