@@ -166,7 +166,7 @@ def make_utxos(self):
166166 total_value = block .vtx [0 ].vout [0 ].nValue
167167 out_value = total_value // 10
168168 tx = CTransaction ()
169- tx .vin .append (CTxIn (COutPoint (block .vtx [0 ].sha256 , 0 ), b'' ))
169+ tx .vin .append (CTxIn (COutPoint (block .vtx [0 ].txid_int , 0 ), b'' ))
170170 for _ in range (10 ):
171171 tx .vout .append (CTxOut (out_value , CScript ([OP_TRUE ])))
172172
@@ -176,7 +176,7 @@ def make_utxos(self):
176176 block2 .solve ()
177177 self .segwit_node .send_and_ping (msg_no_witness_block (block2 ))
178178 assert_equal (int (self .nodes [0 ].getbestblockhash (), 16 ), block2 .sha256 )
179- self .utxos .extend ([[tx .sha256 , i , out_value ] for i in range (10 )])
179+ self .utxos .extend ([[tx .txid_int , i , out_value ] for i in range (10 )])
180180
181181
182182 # Test "sendcmpct" (between peers preferring the same version):
@@ -420,7 +420,7 @@ def build_block_with_transactions(self, node, utxo, num_transactions):
420420 tx = CTransaction ()
421421 tx .vin .append (CTxIn (COutPoint (utxo [0 ], utxo [1 ]), b'' ))
422422 tx .vout .append (CTxOut (utxo [2 ] - 1000 , CScript ([OP_TRUE , OP_DROP ] * 15 + [OP_TRUE ])))
423- utxo = [tx .sha256 , 0 , tx .vout [0 ].nValue ]
423+ utxo = [tx .txid_int , 0 , tx .vout [0 ].nValue ]
424424 block .vtx .append (tx )
425425
426426 block .hashMerkleRoot = block .calc_merkle_root ()
@@ -450,7 +450,7 @@ def test_tip_after_message(node, peer, msg, tip):
450450 utxo = self .utxos .pop (0 )
451451
452452 block = self .build_block_with_transactions (node , utxo , 5 )
453- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
453+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
454454 comp_block = HeaderAndShortIDs ()
455455 comp_block .initialize_from_block (block , use_witness = True )
456456
@@ -463,7 +463,7 @@ def test_tip_after_message(node, peer, msg, tip):
463463
464464 utxo = self .utxos .pop (0 )
465465 block = self .build_block_with_transactions (node , utxo , 5 )
466- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
466+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
467467
468468 # Now try interspersing the prefilled transactions
469469 comp_block .initialize_from_block (block , prefill_list = [0 , 1 , 5 ], use_witness = True )
@@ -474,7 +474,7 @@ def test_tip_after_message(node, peer, msg, tip):
474474 # Now try giving one transaction ahead of time.
475475 utxo = self .utxos .pop (0 )
476476 block = self .build_block_with_transactions (node , utxo , 5 )
477- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
477+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
478478 test_node .send_and_ping (msg_tx (block .vtx [1 ]))
479479 assert block .vtx [1 ].txid_hex in node .getrawmempool ()
480480
@@ -490,7 +490,7 @@ def test_tip_after_message(node, peer, msg, tip):
490490 # announced and verify reconstruction happens immediately.
491491 utxo = self .utxos .pop (0 )
492492 block = self .build_block_with_transactions (node , utxo , 10 )
493- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
493+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
494494 for tx in block .vtx [1 :]:
495495 test_node .send_without_ping (msg_tx (tx ))
496496 test_node .sync_with_ping ()
@@ -517,7 +517,7 @@ def test_incorrect_blocktxn_response(self, test_node):
517517 utxo = self .utxos .pop (0 )
518518
519519 block = self .build_block_with_transactions (node , utxo , 10 )
520- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
520+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
521521 # Relay the first 5 transactions from the block in advance
522522 for tx in block .vtx [1 :6 ]:
523523 test_node .send_without_ping (msg_tx (tx ))
@@ -770,7 +770,7 @@ def announce_cmpct_block(node, peer):
770770 delivery_peer .send_and_ping (msg_cmpctblock (cmpct_block .to_p2p ()))
771771 assert_equal (int (node .getbestblockhash (), 16 ), block .sha256 )
772772
773- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
773+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
774774
775775 # Now test that delivering an invalid compact block won't break relay
776776
@@ -884,7 +884,7 @@ def announce_cmpct_block(node, peer, txn_count):
884884
885885 # Nothing bad should happen if we get a late fill from the first peer...
886886 stalling_peer .send_and_ping (msg )
887- self .utxos .append ([block .vtx [- 1 ].sha256 , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
887+ self .utxos .append ([block .vtx [- 1 ].txid_int , 0 , block .vtx [- 1 ].vout [0 ].nValue ])
888888
889889 delivery_peer .clear_getblocktxn ()
890890 inbound_peer .clear_getblocktxn ()
0 commit comments