#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . # # Test REST interface # import sys; assert sys.version_info < (3,), ur"This script does not run under Python 3. Please use Python 2.7.x." from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal, assert_greater_than, \ initialize_chain_clean, start_nodes, connect_nodes_bi import struct import binascii import json import StringIO from decimal import Decimal try: import http.client as httplib except ImportError: import httplib try: import urllib.parse as urlparse except ImportError: import urlparse def deser_uint256(f): r = 0 for i in range(8): t = struct.unpack(b"