mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
consensus: Store transaction nVersion as uint32_t
Given that the use of a transaction's nVersion is always as an unsigned int, it doesn't make sense to store it as signed and then cast it to unsigned.
This commit is contained in:
@@ -394,7 +394,7 @@ class RPCPackagesTest(BitcoinTestFramework):
|
||||
peer = node.add_p2p_connection(P2PTxInvStore())
|
||||
txs = self.wallet.create_self_transfer_chain(chain_length=2)
|
||||
bad_child = tx_from_hex(txs[1]["hex"])
|
||||
bad_child.nVersion = -1
|
||||
bad_child.nVersion = 0xffffffff
|
||||
hex_partial_acceptance = [txs[0]["hex"], bad_child.serialize().hex()]
|
||||
res = node.submitpackage(hex_partial_acceptance)
|
||||
assert_equal(res["package_msg"], "transaction failed")
|
||||
|
||||
Reference in New Issue
Block a user