Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/p2p.py
Show All 34 Lines | from test_framework.messages import ( | ||||
MSG_TYPE_MASK, | MSG_TYPE_MASK, | ||||
NODE_NETWORK, | NODE_NETWORK, | ||||
CBlockHeader, | CBlockHeader, | ||||
msg_addr, | msg_addr, | ||||
msg_addrv2, | msg_addrv2, | ||||
msg_avahello, | msg_avahello, | ||||
msg_avapoll, | msg_avapoll, | ||||
msg_avaproof, | msg_avaproof, | ||||
msg_avaproofs, | |||||
msg_block, | msg_block, | ||||
msg_blocktxn, | msg_blocktxn, | ||||
msg_cfcheckpt, | msg_cfcheckpt, | ||||
msg_cfheaders, | msg_cfheaders, | ||||
msg_cfilter, | msg_cfilter, | ||||
msg_cmpctblock, | msg_cmpctblock, | ||||
msg_feefilter, | msg_feefilter, | ||||
msg_filteradd, | msg_filteradd, | ||||
msg_filterclear, | msg_filterclear, | ||||
msg_filterload, | msg_filterload, | ||||
msg_getaddr, | msg_getaddr, | ||||
msg_getavaaddr, | msg_getavaaddr, | ||||
msg_getavaproofs, | |||||
msg_getblocks, | msg_getblocks, | ||||
msg_getblocktxn, | msg_getblocktxn, | ||||
msg_getdata, | msg_getdata, | ||||
msg_getheaders, | msg_getheaders, | ||||
msg_headers, | msg_headers, | ||||
msg_inv, | msg_inv, | ||||
msg_mempool, | msg_mempool, | ||||
msg_merkleblock, | msg_merkleblock, | ||||
Show All 26 Lines | |||||
# Value for relay that this test framework sends in its `version` message | # Value for relay that this test framework sends in its `version` message | ||||
P2P_VERSION_RELAY = 1 | P2P_VERSION_RELAY = 1 | ||||
MESSAGEMAP = { | MESSAGEMAP = { | ||||
b"addr": msg_addr, | b"addr": msg_addr, | ||||
b"addrv2": msg_addrv2, | b"addrv2": msg_addrv2, | ||||
b"avapoll": msg_avapoll, | b"avapoll": msg_avapoll, | ||||
b"avaproof": msg_avaproof, | b"avaproof": msg_avaproof, | ||||
b"avaproofs": msg_avaproofs, | |||||
b"avaresponse": msg_tcpavaresponse, | b"avaresponse": msg_tcpavaresponse, | ||||
b"avahello": msg_avahello, | b"avahello": msg_avahello, | ||||
b"block": msg_block, | b"block": msg_block, | ||||
b"blocktxn": msg_blocktxn, | b"blocktxn": msg_blocktxn, | ||||
b"cfcheckpt": msg_cfcheckpt, | b"cfcheckpt": msg_cfcheckpt, | ||||
b"cfheaders": msg_cfheaders, | b"cfheaders": msg_cfheaders, | ||||
b"cfilter": msg_cfilter, | b"cfilter": msg_cfilter, | ||||
b"cmpctblock": msg_cmpctblock, | b"cmpctblock": msg_cmpctblock, | ||||
b"feefilter": msg_feefilter, | b"feefilter": msg_feefilter, | ||||
b"filteradd": msg_filteradd, | b"filteradd": msg_filteradd, | ||||
b"filterclear": msg_filterclear, | b"filterclear": msg_filterclear, | ||||
b"filterload": msg_filterload, | b"filterload": msg_filterload, | ||||
b"getaddr": msg_getaddr, | b"getaddr": msg_getaddr, | ||||
b"getavaaddr": msg_getavaaddr, | b"getavaaddr": msg_getavaaddr, | ||||
b"getavaproofs": msg_getavaproofs, | |||||
b"getblocks": msg_getblocks, | b"getblocks": msg_getblocks, | ||||
b"getblocktxn": msg_getblocktxn, | b"getblocktxn": msg_getblocktxn, | ||||
b"getdata": msg_getdata, | b"getdata": msg_getdata, | ||||
b"getheaders": msg_getheaders, | b"getheaders": msg_getheaders, | ||||
b"headers": msg_headers, | b"headers": msg_headers, | ||||
b"inv": msg_inv, | b"inv": msg_inv, | ||||
b"mempool": msg_mempool, | b"mempool": msg_mempool, | ||||
b"merkleblock": msg_merkleblock, | b"merkleblock": msg_merkleblock, | ||||
▲ Show 20 Lines • Show All 308 Lines • ▼ Show 20 Lines | class P2PInterface(P2PConnection): | ||||
def on_addr(self, message): pass | def on_addr(self, message): pass | ||||
def on_addrv2(self, message): pass | def on_addrv2(self, message): pass | ||||
def on_avapoll(self, message): pass | def on_avapoll(self, message): pass | ||||
def on_avaproof(self, message): pass | def on_avaproof(self, message): pass | ||||
def on_avaproofs(self, message): pass | |||||
def on_avaresponse(self, message): pass | def on_avaresponse(self, message): pass | ||||
def on_avahello(self, message): pass | def on_avahello(self, message): pass | ||||
def on_block(self, message): pass | def on_block(self, message): pass | ||||
def on_blocktxn(self, message): pass | def on_blocktxn(self, message): pass | ||||
Show All 12 Lines | class P2PInterface(P2PConnection): | ||||
def on_filterclear(self, message): pass | def on_filterclear(self, message): pass | ||||
def on_filterload(self, message): pass | def on_filterload(self, message): pass | ||||
def on_getaddr(self, message): pass | def on_getaddr(self, message): pass | ||||
def on_getavaaddr(self, message): pass | def on_getavaaddr(self, message): pass | ||||
def on_getavaproofs(self, message): pass | |||||
def on_getblocks(self, message): pass | def on_getblocks(self, message): pass | ||||
def on_getblocktxn(self, message): pass | def on_getblocktxn(self, message): pass | ||||
def on_getdata(self, message): pass | def on_getdata(self, message): pass | ||||
def on_getheaders(self, message): pass | def on_getheaders(self, message): pass | ||||
▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines |