scripted-diff: Rename mininode to p2p

-BEGIN VERIFY SCRIPT-
sed -i 's/\.mininode/\.p2p/g' $(git grep -l "mininode")
git mv test/functional/test_framework/mininode.py test/functional/test_framework/p2p.py
-END VERIFY SCRIPT-
This commit is contained in:
John Newbery 2020-07-19 14:47:05 +07:00
parent 9e2897d020
commit 85165d4332
43 changed files with 43 additions and 43 deletions

View file

@ -16,7 +16,7 @@ from collections import defaultdict
# Avoid wildcard * imports
from test_framework.blocktools import (create_block, create_coinbase)
from test_framework.messages import CInv, MSG_BLOCK
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
p2p_lock,
msg_block,

View file

@ -42,7 +42,7 @@ from test_framework.messages import (
msg_block,
msg_headers,
)
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.script import (CScript, OP_TRUE)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

View file

@ -26,7 +26,7 @@ from test_framework.messages import (
uint256_from_compact,
uint256_from_str,
)
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.script import (
CScript,
MAX_SCRIPT_ELEMENT_SIZE,

View file

@ -10,7 +10,7 @@ Test that the CHECKLOCKTIMEVERIFY soft-fork activates at (regtest) block height
from test_framework.blocktools import create_coinbase, create_block, create_transaction
from test_framework.messages import CTransaction, msg_block, ToHex
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.script import CScript, OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP, CScriptNum
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (

View file

@ -44,7 +44,7 @@ import time
from test_framework.blocktools import create_coinbase, create_block, create_transaction
from test_framework.messages import ToHex, CTransaction
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.script import (
CScript,
OP_CHECKSEQUENCEVERIFY,

View file

@ -9,7 +9,7 @@ Test that the DERSIG soft-fork activates at (regtest) height 1251.
from test_framework.blocktools import create_coinbase, create_block, create_transaction
from test_framework.messages import msg_block
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.script import CScript
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (

View file

@ -14,7 +14,7 @@ from collections import defaultdict
import time
from test_framework.messages import CInv, MSG_BLOCK, msg_getdata
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, mine_large_block

View file

@ -12,7 +12,7 @@ import re
from test_framework.blocktools import create_block, create_coinbase
from test_framework.messages import msg_block
from test_framework.mininode import P2PInterface, p2p_lock
from test_framework.p2p import P2PInterface, p2p_lock
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import wait_until

View file

@ -7,7 +7,7 @@
from decimal import Decimal
from test_framework.messages import COIN
from test_framework.mininode import P2PTxInvStore
from test_framework.p2p import P2PTxInvStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -40,7 +40,7 @@ import os
import time
from test_framework.test_framework import BitcoinTestFramework
from test_framework.mininode import P2PTxInvStore
from test_framework.p2p import P2PTxInvStore
from test_framework.util import (
assert_equal,
assert_greater_than_or_equal,

View file

@ -7,7 +7,7 @@ to peers until a GETDATA is received."""
import time
from test_framework.mininode import P2PTxInvStore
from test_framework.p2p import P2PTxInvStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -20,7 +20,7 @@ from test_framework.messages import (
CBlockHeader,
BLOCK_HEADER_SIZE,
)
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -12,7 +12,7 @@ from test_framework.messages import (
NODE_WITNESS,
msg_addr,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
)
from test_framework.test_framework import BitcoinTestFramework

View file

@ -18,7 +18,7 @@ from test_framework.messages import (
ser_uint256,
uint256_from_str,
)
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -5,7 +5,7 @@
"""Test p2p blocksonly"""
from test_framework.messages import msg_tx, CTransaction, FromHex
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

View file

@ -11,7 +11,7 @@ import random
from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment
from test_framework.messages import BlockTransactions, BlockTransactionsRequest, calculate_shortid, CBlock, CBlockHeader, CInv, COutPoint, CTransaction, CTxIn, CTxInWitness, CTxOut, FromHex, HeaderAndShortIDs, msg_no_witness_block, msg_no_witness_blocktxn, msg_cmpctblock, msg_getblocktxn, msg_getdata, msg_getheaders, msg_headers, msg_inv, msg_sendcmpct, msg_sendheaders, msg_tx, msg_block, msg_blocktxn, MSG_BLOCK, MSG_CMPCT_BLOCK, MSG_WITNESS_FLAG, NODE_NETWORK, P2PHeaderAndShortIDs, PrefilledTransaction, ser_uint256, ToHex
from test_framework.mininode import p2p_lock, P2PInterface
from test_framework.p2p import p2p_lock, P2PInterface
from test_framework.script import CScript, OP_TRUE, OP_DROP
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, wait_until, softfork_active

View file

@ -8,7 +8,7 @@ from test_framework.messages import (
CBlockHeader,
FromHex,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
msg_headers,
)

View file

@ -16,7 +16,7 @@ Therefore, this test is limited to the remaining protection criteria.
import time
from test_framework.test_framework import BitcoinTestFramework
from test_framework.mininode import P2PInterface, P2PDataStore
from test_framework.p2p import P2PInterface, P2PDataStore
from test_framework.util import assert_equal, wait_until
from test_framework.blocktools import create_block, create_coinbase
from test_framework.messages import CTransaction, FromHex, msg_pong, msg_tx

View file

@ -7,7 +7,7 @@
from decimal import Decimal
from test_framework.messages import MSG_TX, MSG_WTX, msg_feefilter
from test_framework.mininode import p2p_lock, P2PInterface
from test_framework.p2p import p2p_lock, P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

View file

@ -19,7 +19,7 @@ from test_framework.messages import (
msg_mempool,
msg_version,
)
from test_framework.mininode import P2PInterface, p2p_lock
from test_framework.p2p import P2PInterface, p2p_lock
from test_framework.script import MAX_SCRIPT_ELEMENT_SIZE
from test_framework.test_framework import BitcoinTestFramework

View file

@ -12,7 +12,7 @@ import time
from test_framework.blocktools import (create_block, create_coinbase)
from test_framework.messages import CInv, MSG_BLOCK
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
msg_headers,
msg_block,

View file

@ -12,7 +12,7 @@ from test_framework.messages import (
msg_addr,
msg_getaddr,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
p2p_lock
)

View file

@ -9,7 +9,7 @@ from test_framework.messages import (
CInv,
msg_getdata,
)
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework

View file

@ -14,7 +14,7 @@ import copy
from test_framework.blocktools import create_block, create_coinbase, create_tx_with_script
from test_framework.messages import COIN
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

View file

@ -6,7 +6,7 @@
"""
from test_framework.messages import msg_getheaders, msg_getblocks, MAX_LOCATOR_SZ
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework

View file

@ -17,7 +17,7 @@ from test_framework.messages import (
MSG_TX,
ser_string,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PDataStore,
P2PInterface,
)

View file

@ -13,7 +13,7 @@ from test_framework.messages import (
CTxIn,
CTxOut,
)
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -17,7 +17,7 @@ from test_framework.messages import (
msg_ping,
msg_version,
)
from test_framework.mininode import p2p_lock, P2PInterface
from test_framework.p2p import p2p_lock, P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -5,7 +5,7 @@
"""Test that we don't leak txs to inbound peers that we haven't yet announced to"""
from test_framework.messages import msg_getdata, CInv, MSG_TX
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -12,7 +12,7 @@ Test that, when bloom filters are not enabled, peers are disconnected if:
"""
from test_framework.messages import msg_mempool, msg_filteradd, msg_filterload, msg_filterclear
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

View file

@ -9,7 +9,7 @@ and that it responds to getdata requests for blocks correctly:
- send a block within 288 + 2 of the tip
- disconnect peers who request blocks older than that."""
from test_framework.messages import CInv, MSG_BLOCK, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS
from test_framework.mininode import P2PInterface, p2p_lock
from test_framework.p2p import P2PInterface, p2p_lock
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -13,7 +13,7 @@ from test_framework.messages import (
CTxInWitness,
FromHex,
)
from test_framework.mininode import P2PDataStore
from test_framework.p2p import P2PDataStore
from test_framework.script import (
CScript,
OP_TRUE,

View file

@ -8,7 +8,7 @@
import time
from test_framework.messages import msg_pong
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal

View file

@ -42,7 +42,7 @@ from test_framework.messages import (
uint256_from_str,
FromHex,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
p2p_lock,
)

View file

@ -87,7 +87,7 @@ e. Announce one more that doesn't connect.
"""
from test_framework.blocktools import create_block, create_coinbase
from test_framework.messages import CInv
from test_framework.mininode import (
from test_framework.p2p import (
CBlockHeader,
NODE_WITNESS,
P2PInterface,

View file

@ -24,7 +24,7 @@
from time import sleep
from test_framework.messages import msg_ping
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework

View file

@ -16,7 +16,7 @@ from test_framework.messages import (
msg_inv,
msg_notfound,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
p2p_lock,
)

View file

@ -55,7 +55,7 @@ import time
from test_framework.blocktools import create_block, create_coinbase, create_tx_with_script
from test_framework.messages import CBlockHeader, CInv, MSG_BLOCK, msg_block, msg_headers, msg_inv
from test_framework.mininode import p2p_lock, P2PInterface
from test_framework.p2p import p2p_lock, P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,

View file

@ -42,7 +42,7 @@ from test_framework.messages import (
FromHex,
msg_block,
)
from test_framework.mininode import (
from test_framework.p2p import (
P2PInterface,
)

View file

@ -19,7 +19,7 @@ from test_framework.util import (
p2p_port,
wait_until,
)
from test_framework.mininode import P2PInterface
from test_framework.p2p import P2PInterface
import test_framework.messages
from test_framework.messages import (
NODE_NETWORK,

View file

@ -67,7 +67,7 @@ from test_framework.messages import (
)
from test_framework.util import wait_until
logger = logging.getLogger("TestFramework.mininode")
logger = logging.getLogger("TestFramework.p2p")
MESSAGEMAP = {
b"addr": msg_addr,

View file

@ -21,7 +21,7 @@ import time
from .authproxy import JSONRPCException
from . import coverage
from .test_node import TestNode
from .mininode import NetworkThread
from .p2p import NetworkThread
from .util import (
MAX_NODES,
PortSeed,

View file

@ -7,7 +7,7 @@ import time
from test_framework.blocktools import create_block, create_coinbase
from test_framework.messages import ToHex
from test_framework.mininode import P2PTxInvStore, p2p_lock
from test_framework.p2p import P2PTxInvStore, p2p_lock
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, wait_until