@@ -73,7 +73,7 @@ def test_reorg_relay(self):
7373 # request very recent, unanounced transactions.
7474 assert_equal (len (peer1 .get_invs ()), 0 )
7575 # It's too early to request these two transactions
76- requests_too_recent = msg_getdata ([CInv (t = MSG_WTX , h = int (tx ["tx" ].getwtxid () , 16 )) for tx in [tx_before_reorg , tx_child ]])
76+ requests_too_recent = msg_getdata ([CInv (t = MSG_WTX , h = int (tx ["tx" ].wtxid_hex , 16 )) for tx in [tx_before_reorg , tx_child ]])
7777 peer1 .send_and_ping (requests_too_recent )
7878 for _ in range (len (requests_too_recent .inv )):
7979 peer1 .sync_with_ping ()
@@ -82,15 +82,15 @@ def test_reorg_relay(self):
8282 assert "notfound" in peer1 .last_message
8383
8484 # Request the tx from the disconnected block
85- request_disconnected_tx = msg_getdata ([CInv (t = MSG_WTX , h = int (tx_disconnected ["tx" ].getwtxid () , 16 ))])
85+ request_disconnected_tx = msg_getdata ([CInv (t = MSG_WTX , h = int (tx_disconnected ["tx" ].wtxid_hex , 16 ))])
8686 peer1 .send_and_ping (request_disconnected_tx )
8787
8888 # The tx from the disconnected block was never announced, and it entered the mempool later
8989 # than the transactions that are too recent.
9090 assert_equal (len (peer1 .get_invs ()), 0 )
9191 with p2p_lock :
9292 # However, the node will answer requests for the tx from the recently-disconnected block.
93- assert_equal (peer1 .last_message ["tx" ].tx .getwtxid () ,tx_disconnected ["tx" ].getwtxid () )
93+ assert_equal (peer1 .last_message ["tx" ].tx .wtxid_hex ,tx_disconnected ["tx" ].wtxid_hex )
9494
9595 self .nodes [1 ].setmocktime (int (time .time ()) + 300 )
9696 peer1 .sync_with_ping ()
@@ -102,7 +102,7 @@ def test_reorg_relay(self):
102102 last_tx_received = peer1 .last_message ["tx" ]
103103
104104 tx_after_reorg = self .wallet .send_self_transfer (from_node = self .nodes [1 ])
105- request_after_reorg = msg_getdata ([CInv (t = MSG_WTX , h = int (tx_after_reorg ["tx" ].getwtxid () , 16 ))])
105+ request_after_reorg = msg_getdata ([CInv (t = MSG_WTX , h = int (tx_after_reorg ["tx" ].wtxid_hex , 16 ))])
106106 assert tx_after_reorg ["txid" ] in self .nodes [1 ].getrawmempool ()
107107 peer1 .send_and_ping (request_after_reorg )
108108 with p2p_lock :
0 commit comments