File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -300,13 +300,18 @@ def __do_bitcoin(self):
300
300
self .pending_commitments .add (reorged_commitment_timestamp .msg )
301
301
302
302
# Check if this block contains any of the pending transactions
303
-
304
- try :
305
- block = proxy .getblock (block_hash )
306
- except KeyError :
307
- # Must have been a reorg or something, return
308
- logging .error ("Failed to get block" )
309
- return
303
+ block = None
304
+ while block is None :
305
+ try :
306
+ block = proxy .getblock (block_hash )
307
+ except KeyError :
308
+ # Must have been a reorg or something, return
309
+ logging .error ("Failed to get block" )
310
+ return
311
+ except BrokenPipeError :
312
+ logging .error ("BrokenPipeError to get block" )
313
+ time .sleep (5 )
314
+ proxy = bitcoin .rpc .Proxy ()
310
315
311
316
# the following is an optimization, by pre computing the tx_id we rapidly check if our unconfirmed tx
312
317
# is in the block
You can’t perform that action at this time.
0 commit comments