Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017-2019 The Bitcoin Core developers | # Copyright (c) 2017-2019 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. | ||||
"""Class for bitcoind node under test""" | """Class for bitcoind node under test""" | ||||
import collections | |||||
import contextlib | import contextlib | ||||
import decimal | import decimal | ||||
from enum import Enum | |||||
import errno | import errno | ||||
import http.client | import http.client | ||||
import json | import json | ||||
import logging | import logging | ||||
import os | import os | ||||
import re | import re | ||||
import shlex | |||||
import subprocess | import subprocess | ||||
import sys | import sys | ||||
import tempfile | import tempfile | ||||
import time | import time | ||||
import urllib.parse | import urllib.parse | ||||
import collections | from enum import Enum | ||||
import shlex | |||||
from .authproxy import JSONRPCException | from .authproxy import JSONRPCException | ||||
from .descriptors import descsum_create | from .descriptors import descsum_create | ||||
from .messages import XEC, CTransaction, FromHex, MY_SUBVERSION | from .messages import MY_SUBVERSION, XEC, CTransaction, FromHex | ||||
from .util import ( | from .util import ( | ||||
MAX_NODES, | MAX_NODES, | ||||
EncodeDecimal, | |||||
append_config, | append_config, | ||||
delete_cookie_file, | delete_cookie_file, | ||||
get_auth_cookie, | get_auth_cookie, | ||||
get_rpc_proxy, | get_rpc_proxy, | ||||
p2p_port, | p2p_port, | ||||
rpc_url, | rpc_url, | ||||
wait_until_helper, | wait_until_helper, | ||||
EncodeDecimal, | |||||
) | ) | ||||
BITCOIND_PROC_WAIT_TIMEOUT = 60 | BITCOIND_PROC_WAIT_TIMEOUT = 60 | ||||
class FailedToStartError(Exception): | class FailedToStartError(Exception): | ||||
"""Raised when a node fails to start correctly.""" | """Raised when a node fails to start correctly.""" | ||||
▲ Show 20 Lines • Show All 866 Lines • Show Last 20 Lines |