@@ -172,12 +172,15 @@ def mock_getpeerinfo(r, error=False):
172
172
"result" : [
173
173
{
174
174
"id" : 1 ,
175
+ "services" : "000000000000040d" ,
175
176
},
176
177
{
177
178
"id" : 2 ,
179
+ "services" : "0000000000000001" ,
178
180
},
179
181
{
180
182
"id" : 3 ,
183
+ "services" : "0000000000000000" ,
181
184
},
182
185
],
183
186
}
@@ -210,10 +213,10 @@ def mock_getblockfrompeer_inner(r):
210
213
l1 .daemon .rpcproxy .mock_rpc ("getblockfrompeer" , mock_getblockfrompeer ())
211
214
l1 .start (wait_for_bitcoind_sync = False )
212
215
213
- # check that we fetched a block from a peer (1st peer (from the back) in this case).
216
+ # check that we fetched a block from a peer (1st peer (from the back) in this case, but not from 3 which isn't a full node ).
214
217
pruned_block = bitcoind .rpc .getblockhash (bitcoind .rpc .getblockcount ())
215
218
l1 .daemon .wait_for_log (f"failed to fetch block { pruned_block } from the bitcoin backend" )
216
- l1 .daemon .wait_for_log (rf"try to fetch block { pruned_block } from peer 3 " )
219
+ l1 .daemon .wait_for_log (rf"try to fetch block { pruned_block } from peer 2 " )
217
220
l1 .daemon .wait_for_log (rf"Adding block (\d+): { pruned_block } " )
218
221
219
222
# check that we can also fetch from a peer > 1st (from the back).
@@ -222,8 +225,8 @@ def mock_getblockfrompeer_inner(r):
222
225
223
226
pruned_block = bitcoind .rpc .getblockhash (bitcoind .rpc .getblockcount ())
224
227
l1 .daemon .wait_for_log (f"failed to fetch block { pruned_block } from the bitcoin backend" )
225
- l1 .daemon .wait_for_log (rf"failed to fetch block { pruned_block } from peer 3 " )
226
- l1 .daemon .wait_for_log (rf"try to fetch block { pruned_block } from peer (\d+) " )
228
+ l1 .daemon .wait_for_log (rf"failed to fetch block { pruned_block } from peer 2 " )
229
+ l1 .daemon .wait_for_log (rf"try to fetch block { pruned_block } from peer 1 " )
227
230
l1 .daemon .wait_for_log (rf"Adding block (\d+): { pruned_block } " )
228
231
229
232
# check that we retry if we could not fetch any block
0 commit comments