File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -88,16 +88,15 @@ def _connected():
88
88
for tank in tanks :
89
89
# Get actual
90
90
peerinfo = json .loads (_rpc (tank .metadata .name , "getpeerinfo" , "" ))
91
- manuals = 0
91
+ actual = 0
92
92
for peer in peerinfo :
93
93
if peer ["connection_type" ] == "manual" :
94
- manuals += 1
94
+ actual += 1
95
+ expected = int (tank .metadata .annotations ["init_peers" ])
96
+ print (f"Tank { tank .metadata .name } peers expected: { expected } , actual: { actual } " )
95
97
# Even if more edges are specified, bitcoind only allows
96
98
# 8 manual outbound connections
97
-
98
- print ("manual " + str (manuals ))
99
- print (tank .metadata .annotations ["init_peers" ])
100
- if min (8 , int (tank .metadata .annotations ["init_peers" ])) > manuals :
99
+ if min (8 , expected ) > actual :
101
100
print ("Network not connected" )
102
101
return False
103
102
print ("Network connected" )
You can’t perform that action at this time.
0 commit comments