@@ -47,8 +47,7 @@ def run_test(self):
47
47
48
48
self .log .info ("Feed all non-fork headers, including and up to the first checkpoint" )
49
49
self .nodes [0 ].add_p2p_connection (P2PInterface ())
50
- self .nodes [0 ].p2p .send_message (msg_headers (self .headers ))
51
- self .nodes [0 ].p2p .sync_with_ping ()
50
+ self .nodes [0 ].p2p .send_and_ping (msg_headers (self .headers ))
52
51
assert {
53
52
'height' : 546 ,
54
53
'hash' : '000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70' ,
@@ -65,8 +64,7 @@ def run_test(self):
65
64
# On node 0 it succeeds because checkpoints are disabled
66
65
self .restart_node (0 , extra_args = ['-nocheckpoints' ])
67
66
self .nodes [0 ].add_p2p_connection (P2PInterface ())
68
- self .nodes [0 ].p2p .send_message (msg_headers (self .headers_fork ))
69
- self .nodes [0 ].p2p .sync_with_ping ()
67
+ self .nodes [0 ].p2p .send_and_ping (msg_headers (self .headers_fork ))
70
68
assert {
71
69
"height" : 2 ,
72
70
"hash" : "00000000b0494bd6c3d5ff79c497cfce40831871cbf39b1bc28bd1dac817dc39" ,
@@ -76,8 +74,7 @@ def run_test(self):
76
74
77
75
# On node 1 it succeeds because no checkpoint has been reached yet by a chain tip
78
76
self .nodes [1 ].add_p2p_connection (P2PInterface ())
79
- self .nodes [1 ].p2p .send_message (msg_headers (self .headers_fork ))
80
- self .nodes [1 ].p2p .sync_with_ping ()
77
+ self .nodes [1 ].p2p .send_and_ping (msg_headers (self .headers_fork ))
81
78
assert {
82
79
"height" : 2 ,
83
80
"hash" : "00000000b0494bd6c3d5ff79c497cfce40831871cbf39b1bc28bd1dac817dc39" ,
0 commit comments