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:
Ava Chow
2024-01-25 16:27:08 -05:00
parent 6e4d18f37f
commit 27e70f1f5b
16 changed files with 47 additions and 39 deletions

View File

@@ -780,7 +780,7 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
CheckIsStandard(t);
// Disallowed nVersion
t.nVersion = -1;
t.nVersion = std::numeric_limits<uint32_t>::max();
CheckIsNotStandard(t, "version");
t.nVersion = 0;