mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-14 08:39:35 +02:00
net: Add AdvertisedVersion() for protocol version advertised to a peer
This commit is contained in:
@@ -14,7 +14,6 @@ from test_framework.p2p import (
|
||||
P2PDataStore,
|
||||
P2PInterface,
|
||||
P2P_SERVICES,
|
||||
P2P_VERSION,
|
||||
start_p2p_listener,
|
||||
)
|
||||
from test_framework.messages import (
|
||||
@@ -46,6 +45,7 @@ from test_framework.wallet import (
|
||||
MiniWallet,
|
||||
)
|
||||
|
||||
P2P_PRIVATE_VERSION = 70016
|
||||
NUM_PRIVATE_BROADCAST_PER_TX = 3
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ class P2PPrivateBroadcast(BitcoinTestFramework):
|
||||
})
|
||||
dummy_address = CAddress()
|
||||
dummy_address.nServices = 0
|
||||
assert_equal(peer.last_message["version"].nVersion, P2P_VERSION)
|
||||
assert_equal(peer.last_message["version"].nVersion, P2P_PRIVATE_VERSION)
|
||||
assert_equal(peer.last_message["version"].nServices, 0)
|
||||
assert_equal(peer.last_message["version"].nTime, 0)
|
||||
assert_equal(peer.last_message["version"].addrTo, dummy_address)
|
||||
|
||||
Reference in New Issue
Block a user