Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/comptool.py
Show All 11 Lines | TestNode behaves as follows: | ||||
Configure with a BlockStore and TxStore | Configure with a BlockStore and TxStore | ||||
on_inv: log the message but don't request | on_inv: log the message but don't request | ||||
on_headers: log the chain tip | on_headers: log the chain tip | ||||
on_pong: update ping response map (for synchronization) | on_pong: update ping response map (for synchronization) | ||||
on_getheaders: provide headers via BlockStore | on_getheaders: provide headers via BlockStore | ||||
on_getdata: provide blocks via BlockStore | on_getdata: provide blocks via BlockStore | ||||
""" | """ | ||||
from .mininode import * | import logging | ||||
from .blockstore import BlockStore, TxStore | from .blockstore import BlockStore, TxStore | ||||
from .messages import ( | |||||
CBlock, | |||||
CBlockHeader, | |||||
CInv, | |||||
CTransaction, | |||||
MAX_INV_SZ, | |||||
msg_block, | |||||
msg_getheaders, | |||||
msg_headers, | |||||
msg_inv, | |||||
msg_mempool, | |||||
msg_ping, | |||||
) | |||||
from .mininode import mininode_lock, P2PInterface | |||||
from .util import p2p_port, wait_until | from .util import p2p_port, wait_until | ||||
import logging | |||||
logger = logging.getLogger("TestFramework.comptool") | logger = logging.getLogger("TestFramework.comptool") | ||||
global mininode_lock | global mininode_lock | ||||
class RejectResult(): | class RejectResult(): | ||||
"""Outcome that expects rejection of a transaction or block.""" | """Outcome that expects rejection of a transaction or block.""" | ||||
▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines |