@@ -117,7 +117,10 @@ def load_blockchain_show(blockchain):
117
117
118
118
def load_connections_show (blockchain ):
119
119
chia_binary = globals .get_blockchain_binary (blockchain )
120
- proc = Popen ("{0} show --connections" .format (chia_binary ), stdout = PIPE , stderr = PIPE , shell = True )
120
+ if blockchain == 'cactus' : # Cactus now supports only 'peer' command
121
+ proc = Popen ("{0} peer -c full_node" .format (chia_binary ), stdout = PIPE , stderr = PIPE , shell = True )
122
+ else :
123
+ proc = Popen ("{0} show --connections" .format (chia_binary ), stdout = PIPE , stderr = PIPE , shell = True )
121
124
try :
122
125
outs , errs = proc .communicate (timeout = 30 )
123
126
if errs :
@@ -205,7 +208,10 @@ def pause_wallet(blockchain):
205
208
def remove_connection (node_id , ip , blockchain ):
206
209
chia_binary = globals .get_blockchain_binary (blockchain )
207
210
try :
208
- proc = Popen ("{0} show --remove-connection {1}" .format (chia_binary , node_id ), stdout = PIPE , stderr = PIPE , shell = True )
211
+ if blockchain == 'cactus' : # Cactus now supports only 'peer' command
212
+ proc = Popen ("{0} peer --remove-connection {1} full_node" .format (chia_binary , node_id ), stdout = PIPE , stderr = PIPE , shell = True )
213
+ else :
214
+ proc = Popen ("{0} show --remove-connection {1}" .format (chia_binary , node_id ), stdout = PIPE , stderr = PIPE , shell = True )
209
215
try :
210
216
outs , errs = proc .communicate (timeout = 30 )
211
217
if errs :
@@ -286,7 +292,10 @@ def add_connections(connections, blockchain):
286
292
elif socket .gethostbyname (hostname ) != hostname :
287
293
app .logger .debug ('{} is a valid hostname' .format (hostname ))
288
294
app .logger .info ("Adding {0} connection to peer: {1}" .format (blockchain , connection ))
289
- proc = Popen ("{0} show --add-connection {1}" .format (chia_binary , connection ), stdout = PIPE , stderr = PIPE , shell = True )
295
+ if blockchain == 'cactus' : # Cactus now supports only 'peer' command
296
+ proc = Popen ("{0} peer --add-connection {1} full_node" .format (chia_binary , connection ), stdout = PIPE , stderr = PIPE , shell = True )
297
+ else :
298
+ proc = Popen ("{0} show --add-connection {1}" .format (chia_binary , connection ), stdout = PIPE , stderr = PIPE , shell = True )
290
299
try :
291
300
outs , errs = proc .communicate (timeout = 60 )
292
301
if errs :
0 commit comments