aboutsummaryrefslogtreecommitdiff
path: root/src/test/txvalidation_tests.cpp
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-01-26 15:27:13 -0500
committerAva Chow <github@achow101.com>2024-06-07 13:55:23 -0400
commit429ec1aaaaafab150f11e27fcf132a99b57c4fc7 (patch)
treee09999b341f124bf12712f5111d563a9003f1872 /src/test/txvalidation_tests.cpp
parent27e70f1f5be1f536f2314cd2ea42b4f80d927fbd (diff)
downloadbitcoin-429ec1aaaaafab150f11e27fcf132a99b57c4fc7.tar.xz
refactor: Rename CTransaction::nVersion to version
In order to ensure that the change of nVersion to a uint32_t in the previous commit has no effect, rename nVersion to version in this commit so that reviewers can easily spot if a spot was missed or if there is a check somewhere whose semantics have changed.
Diffstat (limited to 'src/test/txvalidation_tests.cpp')
-rw-r--r--src/test/txvalidation_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/txvalidation_tests.cpp b/src/test/txvalidation_tests.cpp
index f36c245383..f429f94a2f 100644
--- a/src/test/txvalidation_tests.cpp
+++ b/src/test/txvalidation_tests.cpp
@@ -27,7 +27,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_reject_coinbase, TestChain100Setup)
CScript scriptPubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;
CMutableTransaction coinbaseTx;
- coinbaseTx.nVersion = 1;
+ coinbaseTx.version = 1;
coinbaseTx.vin.resize(1);
coinbaseTx.vout.resize(1);
coinbaseTx.vin[0].scriptSig = CScript() << OP_11 << OP_EQUAL;
@@ -72,11 +72,11 @@ static inline std::vector<CPubKey> random_keys(size_t num_keys) {
return keys;
}
-// Creates a placeholder tx (not valid) with 25 outputs. Specify the nVersion and the inputs.
+// Creates a placeholder tx (not valid) with 25 outputs. Specify the version and the inputs.
static inline CTransactionRef make_tx(const std::vector<COutPoint>& inputs, int32_t version)
{
CMutableTransaction mtx = CMutableTransaction{};
- mtx.nVersion = version;
+ mtx.version = version;
mtx.vin.resize(inputs.size());
mtx.vout.resize(25);
for (size_t i{0}; i < inputs.size(); ++i) {
@@ -286,7 +286,7 @@ BOOST_FIXTURE_TEST_CASE(version3_tests, RegTestingSetup)
script_multisig << OP_2 << OP_CHECKMULTISIG;
{
CMutableTransaction mtx_many_sigops = CMutableTransaction{};
- mtx_many_sigops.nVersion = TRUC_VERSION;
+ mtx_many_sigops.version = TRUC_VERSION;
for (const auto& outpoint : multisig_outpoints) {
mtx_many_sigops.vin.emplace_back(outpoint);
mtx_many_sigops.vin.back().scriptWitness.stack.emplace_back(script_multisig.begin(), script_multisig.end());