mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
tests: Use explicit imports
This commit is contained in:
@@ -14,12 +14,12 @@ added in the future, they should try to follow the same convention and not
|
||||
make assumptions about execution order.
|
||||
"""
|
||||
|
||||
from test_framework.blocktools import send_to_witness
|
||||
from decimal import Decimal
|
||||
|
||||
from test_framework.blocktools import add_witness_commitment, create_block, create_coinbase, send_to_witness
|
||||
from test_framework.messages import BIP125_SEQUENCE_NUMBER, CTransaction
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework import blocktools
|
||||
from test_framework.messages import BIP125_SEQUENCE_NUMBER
|
||||
from test_framework.mininode import CTransaction
|
||||
from test_framework.util import *
|
||||
from test_framework.util import assert_equal, assert_greater_than, assert_raises_rpc_error, bytes_to_hex_str, connect_nodes_bi, hex_str_to_bytes, sync_mempools
|
||||
|
||||
import io
|
||||
|
||||
@@ -290,11 +290,11 @@ def submit_block_with_tx(node, tx):
|
||||
tip = node.getbestblockhash()
|
||||
height = node.getblockcount() + 1
|
||||
block_time = node.getblockheader(tip)["mediantime"] + 1
|
||||
block = blocktools.create_block(int(tip, 16), blocktools.create_coinbase(height), block_time)
|
||||
block = create_block(int(tip, 16), create_coinbase(height), block_time)
|
||||
block.vtx.append(ctx)
|
||||
block.rehash()
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
blocktools.add_witness_commitment(block)
|
||||
add_witness_commitment(block)
|
||||
block.solve()
|
||||
node.submitblock(bytes_to_hex_str(block.serialize(True)))
|
||||
return block
|
||||
|
||||
Reference in New Issue
Block a user