File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,18 @@ def gen(n):
42
42
ln_addrs = []
43
43
44
44
def get_ln_addr (self , ln ):
45
- success , address = ln .newaddress ()
46
- if success :
47
- ln_addrs .append (address )
48
- self .log .info (f"Got wallet address { address } from { ln .name } " )
49
- else :
50
- self .log .info (f"Couldn't get wallet address from { ln .name } " )
45
+ address = None
46
+ while True :
47
+ success , address = ln .newaddress ()
48
+ if success :
49
+ ln_addrs .append (address )
50
+ self .log .info (f"Got wallet address { address } from { ln .name } " )
51
+ break
52
+ else :
53
+ self .log .info (
54
+ f"Couldn't get wallet address from { ln .name } , retrying in 5 seconds..."
55
+ )
56
+ sleep (5 )
51
57
52
58
addr_threads = [
53
59
threading .Thread (target = get_ln_addr , args = (self , ln )) for ln in self .lns .values ()
You can’t perform that action at this time.
0 commit comments