File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -186,12 +186,15 @@ def received_sendcmpct():
186
186
187
187
def check_announcement_of_new_block (node , peer , predicate ):
188
188
peer .clear_block_announcement ()
189
- node .generate (1 )
190
- got_message = wait_until ( lambda : peer .block_announced , timeout = 30 )
189
+ block_hash = int ( node .generate (1 )[ 0 ], 16 )
190
+ peer .wait_for_block_announcement ( block_hash , timeout = 30 )
191
191
assert (peer .block_announced )
192
192
assert (got_message )
193
+
193
194
with mininode_lock :
194
- assert (predicate (peer ))
195
+ assert predicate (peer ), (
196
+ "block_hash={!r}, cmpctblock={!r}, inv={!r}" .format (
197
+ block_hash , peer .last_cmpctblock , peer .last_inv ))
195
198
196
199
# We shouldn't get any block announcements via cmpctblock yet.
197
200
check_announcement_of_new_block (node , test_node , lambda p : p .last_cmpctblock is None )
You can’t perform that action at this time.
0 commit comments