Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_net.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017 The Bitcoin Core developers | # Copyright (c) 2017 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 RPC calls related to net. | """Test RPC calls related to net. | ||||
Tests correspond to code in rpc/net.cpp. | Tests correspond to code in rpc/net.cpp. | ||||
""" | """ | ||||
import time | |||||
from decimal import Decimal | from decimal import Decimal | ||||
from itertools import product | from itertools import product | ||||
import time | |||||
import test_framework.messages | |||||
from test_framework.avatools import create_coinbase_stakes | from test_framework.avatools import create_coinbase_stakes | ||||
from test_framework.key import ECKey | from test_framework.key import ECKey | ||||
from test_framework.p2p import P2PInterface | |||||
import test_framework.messages | |||||
from test_framework.messages import NODE_NETWORK | from test_framework.messages import NODE_NETWORK | ||||
from test_framework.p2p import P2PInterface | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import ( | from test_framework.util import ( | ||||
assert_approx, | assert_approx, | ||||
assert_equal, | assert_equal, | ||||
assert_greater_than_or_equal, | |||||
assert_greater_than, | assert_greater_than, | ||||
assert_greater_than_or_equal, | |||||
assert_raises_rpc_error, | assert_raises_rpc_error, | ||||
connect_nodes, | connect_nodes, | ||||
p2p_port, | p2p_port, | ||||
wait_until, | wait_until, | ||||
) | ) | ||||
from test_framework.wallet_util import bytes_to_wif | from test_framework.wallet_util import bytes_to_wif | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |