diff options
author | Ava Chow <github@achow101.com> | 2024-01-25 16:27:08 -0500 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-06-07 12:40:21 -0400 |
commit | 27e70f1f5be1f536f2314cd2ea42b4f80d927fbd (patch) | |
tree | 0cdfa2c9d06bf39b9839de304975aba80caf3c28 /test/functional/test_framework/script.py | |
parent | 6e4d18f37f42894fe9a0d7948c1da3f061fc6b60 (diff) | |
download | bitcoin-27e70f1f5be1f536f2314cd2ea42b4f80d927fbd.tar.xz |
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.
Diffstat (limited to 'test/functional/test_framework/script.py')
-rw-r--r-- | test/functional/test_framework/script.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py index ab3dc2ffb1..8489e2937d 100644 --- a/test/functional/test_framework/script.py +++ b/test/functional/test_framework/script.py @@ -738,7 +738,7 @@ def SegwitV0SignatureMsg(script, txTo, inIdx, hashtype, amount): hashOutputs = uint256_from_str(hash256(serialize_outputs)) ss = bytes() - ss += txTo.nVersion.to_bytes(4, "little", signed=True) + ss += txTo.nVersion.to_bytes(4, "little") ss += ser_uint256(hashPrevouts) ss += ser_uint256(hashSequence) ss += txTo.vin[inIdx].prevout.serialize() @@ -817,7 +817,7 @@ def TaprootSignatureMsg(txTo, spent_utxos, hash_type, input_index = 0, scriptpat in_type = hash_type & SIGHASH_ANYONECANPAY spk = spent_utxos[input_index].scriptPubKey ss = bytes([0, hash_type]) # epoch, hash_type - ss += txTo.nVersion.to_bytes(4, "little", signed=True) + ss += txTo.nVersion.to_bytes(4, "little") ss += txTo.nLockTime.to_bytes(4, "little") if in_type != SIGHASH_ANYONECANPAY: ss += BIP341_sha_prevouts(txTo) |