mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-26 05:48:20 +01:00
test: replace inv type magic numbers by constants
This commit is contained in:
@@ -54,7 +54,7 @@ Node1 is unused in tests 3-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_headers, msg_inv
|
||||
from test_framework.messages import CBlockHeader, CInv, MSG_BLOCK, msg_block, msg_headers, msg_inv
|
||||
from test_framework.mininode import mininode_lock, P2PInterface
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
@@ -210,7 +210,7 @@ class AcceptBlockTest(BitcoinTestFramework):
|
||||
with mininode_lock:
|
||||
# Clear state so we can check the getdata request
|
||||
test_node.last_message.pop("getdata", None)
|
||||
test_node.send_message(msg_inv([CInv(2, block_h3.sha256)]))
|
||||
test_node.send_message(msg_inv([CInv(MSG_BLOCK, block_h3.sha256)]))
|
||||
|
||||
test_node.sync_with_ping()
|
||||
with mininode_lock:
|
||||
|
||||
Reference in New Issue
Block a user