@@ -107,29 +107,33 @@ def run_test(self):
107
107
peer .send_message (create_sendtxrcncl_msg ())
108
108
self .wait_until (lambda : "sendtxrcncl" in self .nodes [0 ].getpeerinfo ()[- 1 ]["bytesrecv_per_msg" ])
109
109
self .log .info ('second SENDTXRCNCL triggers a disconnect' )
110
- peer .send_message (create_sendtxrcncl_msg ())
111
- peer .wait_for_disconnect ()
110
+ with self .nodes [0 ].assert_debug_log (["(sendtxrcncl received from already registered peer); disconnecting" ]):
111
+ peer .send_message (create_sendtxrcncl_msg ())
112
+ peer .wait_for_disconnect ()
112
113
113
114
self .log .info ('SENDTXRCNCL with initiator=responder=0 triggers a disconnect' )
114
115
sendtxrcncl_no_role = create_sendtxrcncl_msg ()
115
116
sendtxrcncl_no_role .initiator = False
116
117
sendtxrcncl_no_role .responder = False
117
118
peer = self .nodes [0 ].add_p2p_connection (PeerNoVerack (), send_version = True , wait_for_verack = False )
118
- peer .send_message (sendtxrcncl_no_role )
119
- peer .wait_for_disconnect ()
119
+ with self .nodes [0 ].assert_debug_log (["txreconciliation protocol violation" ]):
120
+ peer .send_message (sendtxrcncl_no_role )
121
+ peer .wait_for_disconnect ()
120
122
121
123
self .log .info ('SENDTXRCNCL with initiator=0 and responder=1 from inbound triggers a disconnect' )
122
124
sendtxrcncl_wrong_role = create_sendtxrcncl_msg (initiator = False )
123
125
peer = self .nodes [0 ].add_p2p_connection (PeerNoVerack (), send_version = True , wait_for_verack = False )
124
- peer .send_message (sendtxrcncl_wrong_role )
125
- peer .wait_for_disconnect ()
126
+ with self .nodes [0 ].assert_debug_log (["txreconciliation protocol violation" ]):
127
+ peer .send_message (sendtxrcncl_wrong_role )
128
+ peer .wait_for_disconnect ()
126
129
127
130
self .log .info ('SENDTXRCNCL with version=0 triggers a disconnect' )
128
131
sendtxrcncl_low_version = create_sendtxrcncl_msg ()
129
132
sendtxrcncl_low_version .version = 0
130
133
peer = self .nodes [0 ].add_p2p_connection (PeerNoVerack (), send_version = True , wait_for_verack = False )
131
- peer .send_message (sendtxrcncl_low_version )
132
- peer .wait_for_disconnect ()
134
+ with self .nodes [0 ].assert_debug_log (["txreconciliation protocol violation" ]):
135
+ peer .send_message (sendtxrcncl_low_version )
136
+ peer .wait_for_disconnect ()
133
137
134
138
self .log .info ('sending SENDTXRCNCL after sending VERACK triggers a disconnect' )
135
139
peer = self .nodes [0 ].add_p2p_connection (P2PInterface ())
@@ -162,8 +166,9 @@ def run_test(self):
162
166
self .log .info ('SENDTXRCNCL if block-relay-only triggers a disconnect' )
163
167
peer = self .nodes [0 ].add_outbound_p2p_connection (
164
168
PeerNoVerack (), wait_for_verack = False , p2p_idx = 3 , connection_type = "block-relay-only" )
165
- peer .send_message (create_sendtxrcncl_msg (initiator = False ))
166
- peer .wait_for_disconnect ()
169
+ with self .nodes [0 ].assert_debug_log (["we indicated no tx relay; disconnecting" ]):
170
+ peer .send_message (create_sendtxrcncl_msg (initiator = False ))
171
+ peer .wait_for_disconnect ()
167
172
168
173
self .log .info ('SENDTXRCNCL with initiator=1 and responder=0 from outbound triggers a disconnect' )
169
174
sendtxrcncl_wrong_role = create_sendtxrcncl_msg (initiator = True )
0 commit comments