#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test REST interface # from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from struct import * import binascii import json import StringIO 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 = unpack(b"