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():
8888 for tank in tanks :
8989 # Get actual
9090 peerinfo = json .loads (_rpc (tank .metadata .name , "getpeerinfo" , "" ))
91- manuals = 0
91+ actual = 0
9292 for peer in peerinfo :
9393 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 } " )
9597 # Even if more edges are specified, bitcoind only allows
9698 # 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 :
101100 print ("Network not connected" )
102101 return False
103102 print ("Network connected" )
You can’t perform that action at this time.
0 commit comments