14 import http.client
as httplib
18 import urllib.parse
as urlparse
55 self.
nodes[2].
setban(
"2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/19",
"add", 1000)
57 assert_equal(
"192.168.0.1/32", listBeforeShutdown[2][
'address'])
65 assert_equal(
"127.0.0.0/24", listAfterShutdown[0][
'address'])
66 assert_equal(
"127.0.0.0/32", listAfterShutdown[1][
'address'])
67 assert_equal(
"/19" in listAfterShutdown[2][
'address'],
True)
72 url = urlparse.urlparse(self.
nodes[1].url)
76 assert(node[
'addr'] != url.hostname+
":"+str(
p2p_port(1)))
81 if node[
'addr'] == url.hostname+
":"+str(
p2p_port(1)):
85 if __name__ ==
'__main__':
86 NodeHandlingTest ().main ()
UniValue clearbanned(const UniValue ¶ms, bool fHelp)
UniValue listbanned(const UniValue ¶ms, bool fHelp)
UniValue disconnectnode(const UniValue ¶ms, bool fHelp)
UniValue setban(const UniValue ¶ms, bool fHelp)
def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None)
UniValue getpeerinfo(const UniValue ¶ms, bool fHelp)
def assert_equal(thing1, thing2)
def connect_nodes_bi(nodes, a, b)