mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-25 13:28:35 +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:
@@ -1164,7 +1164,7 @@ class SegWitTest(BitcoinTestFramework):
|
||||
if not self.wit.is_null():
|
||||
flags |= 1
|
||||
r = b""
|
||||
r += self.nVersion.to_bytes(4, "little", signed=True)
|
||||
r += self.nVersion.to_bytes(4, "little")
|
||||
if flags:
|
||||
dummy = []
|
||||
r += ser_vector(dummy)
|
||||
@@ -1975,7 +1975,7 @@ class SegWitTest(BitcoinTestFramework):
|
||||
def serialize_with_bogus_witness(tx):
|
||||
flags = 3
|
||||
r = b""
|
||||
r += tx.nVersion.to_bytes(4, "little", signed=True)
|
||||
r += tx.nVersion.to_bytes(4, "little")
|
||||
if flags:
|
||||
dummy = []
|
||||
r += ser_vector(dummy)
|
||||
|
||||
Reference in New Issue
Block a user