Changeset View
Changeset View
Standalone View
Standalone View
test/functional/chronik_script_unconfirmed_txs.py
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
output_script=bytes(P2SH_OP_TRUE), | output_script=bytes(P2SH_OP_TRUE), | ||||
), | ), | ||||
pb.TxOutput( | pb.TxOutput( | ||||
value=0, | value=0, | ||||
output_script=bytes(pad_script), | output_script=bytes(pad_script), | ||||
), | ), | ||||
], | ], | ||||
lock_time=1, | lock_time=1, | ||||
size=len(tx.serialize()), | |||||
time_first_seen=time_first_seen, | time_first_seen=time_first_seen, | ||||
)) | )) | ||||
# Sort txs by time_first_seen and then by txid | # Sort txs by time_first_seen and then by txid | ||||
def sorted_txs(txs): | def sorted_txs(txs): | ||||
return sorted(txs, key=lambda tx: (tx.time_first_seen, tx.txid[::-1])) | return sorted(txs, key=lambda tx: (tx.time_first_seen, tx.txid[::-1])) | ||||
assert_equal( | assert_equal( | ||||
Show All 39 Lines |