mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
In disconnect_p2ps(), wait for p2p connections to disappear from getpeerinfo()
This commit is contained in:
parent
76d7b17dcd
commit
305485418b
@ -15,6 +15,7 @@ import subprocess
|
||||
import time
|
||||
|
||||
from .authproxy import JSONRPCException
|
||||
from .messages import MY_SUBVERSION
|
||||
from .util import (
|
||||
assert_equal,
|
||||
delete_cookie_file,
|
||||
@ -223,6 +224,14 @@ class TestNode():
|
||||
p.peer_disconnect()
|
||||
del self.p2ps[:]
|
||||
|
||||
# wait for p2p connections to disappear from getpeerinfo()
|
||||
def check_peers():
|
||||
for p in self.getpeerinfo():
|
||||
if p['subver'] == MY_SUBVERSION.decode():
|
||||
return False
|
||||
return True
|
||||
wait_until(check_peers, timeout=5)
|
||||
|
||||
class TestNodeCLIAttr:
|
||||
def __init__(self, cli, command):
|
||||
self.cli = cli
|
||||
|
Loading…
Reference in New Issue
Block a user