Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_bind.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
# Test for -rpcbind, as well as -rpcallowip and -rpcconnect | # Test for -rpcbind, as well as -rpcallowip and -rpcconnect | ||||
from platform import uname | from platform import uname | ||||
import socket | |||||
import sys | |||||
from test_framework.netutil import addr_to_hex, all_interfaces, get_bind_addrs | |||||
from test_framework.test_framework import BitcoinTestFramework, SkipTest | from test_framework.test_framework import BitcoinTestFramework, SkipTest | ||||
from test_framework.util import * | from test_framework.util import ( | ||||
from test_framework.netutil import * | assert_equal, | ||||
assert_raises_rpc_error, | |||||
get_datadir_path, | |||||
get_rpc_proxy, | |||||
rpc_port, | |||||
rpc_url, | |||||
) | |||||
class RPCBindTest(BitcoinTestFramework): | class RPCBindTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
def setup_network(self): | def setup_network(self): | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |