Clean up imports to be pyflakes-checkable. fixes #2450

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood
2017-06-20 21:09:33 +01:00
parent d52ac0d498
commit aff0bf7fa1
50 changed files with 215 additions and 167 deletions

View File

@@ -3,7 +3,10 @@
# and for constructing a getheaders message
#
from mininode import *
from mininode import CBlock, CBlockHeader, CBlockLocator, CTransaction, msg_block, msg_headers, msg_tx
import sys
import cStringIO
import dbm
class BlockStore(object):

View File

@@ -4,8 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from mininode import *
from script import CScript, CScriptOp
from mininode import CBlock, CTransaction, CTxIn, CTxOut, COutPoint, ser_string
# Create a block (with regtest difficulty)
def create_block(hashprev, coinbase, nTime=None):

View File

@@ -4,10 +4,13 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from mininode import *
from mininode import CBlock, CTransaction, CInv, NodeConn, NodeConnCB, \
msg_inv, msg_getheaders, msg_ping, msg_mempool, mininode_lock, MAX_INV_SZ
from blockstore import BlockStore, TxStore
from util import p2p_port
import time
'''
This is a tool for comparing two or more bitcoinds to each other
using a script provided.
@@ -25,8 +28,6 @@ generator that returns TestInstance objects. See below for definition.
# on_getheaders: provide headers via BlockStore
# on_getdata: provide blocks via BlockStore
global mininode_lock
def wait_until(predicate, attempts=float('inf'), timeout=float('inf')):
attempt = 0
elapsed = 0

View File

@@ -24,10 +24,10 @@ if sys.version > '3':
bchr = lambda x: bytes([x])
bord = lambda x: x
import copy
import struct
import binascii
import test_framework.bignum
from test_framework import bignum
MAX_SCRIPT_SIZE = 10000
MAX_SCRIPT_ELEMENT_SIZE = 520

View File

@@ -13,8 +13,11 @@ import shutil
import tempfile
import traceback
from authproxy import AuthServiceProxy, JSONRPCException
from util import *
from authproxy import JSONRPCException
from util import assert_equal, check_json_precision, \
initialize_chain, initialize_chain_clean, \
start_nodes, connect_nodes_bi, stop_nodes, \
sync_blocks, sync_mempools, wait_bitcoinds
class BitcoinTestFramework(object):

View File

@@ -21,8 +21,7 @@ import subprocess
import time
import re
from authproxy import AuthServiceProxy, JSONRPCException
from util import *
from authproxy import AuthServiceProxy
def p2p_port(n):
return 11000 + n + os.getpid()%999