File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 10
10
ORPHAN_TX_EXPIRE_TIME ,
11
11
tx_in_orphanage ,
12
12
)
13
- from test_framework .messages import msg_tx
13
+ from test_framework .messages import (
14
+ CInv ,
15
+ msg_inv ,
16
+ msg_tx ,
17
+ MSG_WTX ,
18
+ )
14
19
from test_framework .p2p import P2PInterface
15
20
from test_framework .util import (
16
21
assert_equal ,
@@ -106,13 +111,19 @@ def test_orphan_details(self):
106
111
107
112
self .log .info ("Check that orphan 1 and 2 were from different peers" )
108
113
assert orphanage [0 ]["from" ][0 ] != orphanage [1 ]["from" ][0 ]
114
+ peer_ids = [orphanage [0 ]["from" ][0 ], orphanage [1 ]["from" ][0 ]]
109
115
110
116
self .log .info ("Unorphan child 2" )
111
117
peer_2 .send_and_ping (msg_tx (tx_parent_2 ["tx" ]))
112
118
assert not tx_in_orphanage (node , tx_child_2 ["tx" ])
113
119
120
+ self .log .info ("Check that additional announcers are reflected in RPC result" )
121
+ peer_2 .send_and_ping (msg_inv ([CInv (t = MSG_WTX , h = int (tx_child_1 ["wtxid" ], 16 ))]))
122
+
123
+ orphanage = node .getorphantxs (verbosity = 2 )
124
+ assert_equal (set (orphanage [0 ]["from" ]), set (peer_ids ))
125
+
114
126
self .log .info ("Checking orphan details" )
115
- orphanage = node .getorphantxs (verbosity = 1 )
116
127
assert_equal (len (node .getorphantxs ()), 1 )
117
128
orphan_1 = orphanage [0 ]
118
129
self .orphan_details_match (orphan_1 , tx_child_1 , verbosity = 1 )
You can’t perform that action at this time.
0 commit comments