aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-01-25 16:27:08 -0500
committerAva Chow <github@achow101.com>2024-06-07 12:40:21 -0400
commit27e70f1f5be1f536f2314cd2ea42b4f80d927fbd (patch)
tree0cdfa2c9d06bf39b9839de304975aba80caf3c28 /src/test/fuzz
parent6e4d18f37f42894fe9a0d7948c1da3f061fc6b60 (diff)
downloadbitcoin-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 'src/test/fuzz')
-rw-r--r--src/test/fuzz/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/util.cpp b/src/test/fuzz/util.cpp
index 259b00fcae..a1119297f4 100644
--- a/src/test/fuzz/util.cpp
+++ b/src/test/fuzz/util.cpp
@@ -45,7 +45,7 @@ CMutableTransaction ConsumeTransaction(FuzzedDataProvider& fuzzed_data_provider,
const auto p2wsh_op_true = fuzzed_data_provider.ConsumeBool();
tx_mut.nVersion = fuzzed_data_provider.ConsumeBool() ?
CTransaction::CURRENT_VERSION :
- fuzzed_data_provider.ConsumeIntegral<int32_t>();
+ fuzzed_data_provider.ConsumeIntegral<uint32_t>();
tx_mut.nLockTime = fuzzed_data_provider.ConsumeIntegral<uint32_t>();
const auto num_in = fuzzed_data_provider.ConsumeIntegralInRange<int>(0, max_num_in);
const auto num_out = fuzzed_data_provider.ConsumeIntegralInRange<int>(0, max_num_out);