mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
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.
This commit is contained in:
@@ -46,7 +46,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, Dersig100Setup)
|
||||
spends.resize(2);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
spends[i].nVersion = 1;
|
||||
spends[i].version = 1;
|
||||
spends[i].vin.resize(1);
|
||||
spends[i].vin[0].prevout.hash = m_coinbase_txns[0]->GetHash();
|
||||
spends[i].vin[0].prevout.n = 0;
|
||||
@@ -181,7 +181,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
|
||||
// coinbase tx.
|
||||
CMutableTransaction spend_tx;
|
||||
|
||||
spend_tx.nVersion = 1;
|
||||
spend_tx.version = 1;
|
||||
spend_tx.vin.resize(1);
|
||||
spend_tx.vin[0].prevout.hash = m_coinbase_txns[0]->GetHash();
|
||||
spend_tx.vin[0].prevout.n = 0;
|
||||
@@ -243,7 +243,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
|
||||
// then test validity with P2SH.
|
||||
{
|
||||
CMutableTransaction invalid_under_p2sh_tx;
|
||||
invalid_under_p2sh_tx.nVersion = 1;
|
||||
invalid_under_p2sh_tx.version = 1;
|
||||
invalid_under_p2sh_tx.vin.resize(1);
|
||||
invalid_under_p2sh_tx.vin[0].prevout.hash = spend_tx.GetHash();
|
||||
invalid_under_p2sh_tx.vin[0].prevout.n = 0;
|
||||
@@ -259,7 +259,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
|
||||
// Test CHECKLOCKTIMEVERIFY
|
||||
{
|
||||
CMutableTransaction invalid_with_cltv_tx;
|
||||
invalid_with_cltv_tx.nVersion = 1;
|
||||
invalid_with_cltv_tx.version = 1;
|
||||
invalid_with_cltv_tx.nLockTime = 100;
|
||||
invalid_with_cltv_tx.vin.resize(1);
|
||||
invalid_with_cltv_tx.vin[0].prevout.hash = spend_tx.GetHash();
|
||||
@@ -288,7 +288,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
|
||||
// TEST CHECKSEQUENCEVERIFY
|
||||
{
|
||||
CMutableTransaction invalid_with_csv_tx;
|
||||
invalid_with_csv_tx.nVersion = 2;
|
||||
invalid_with_csv_tx.version = 2;
|
||||
invalid_with_csv_tx.vin.resize(1);
|
||||
invalid_with_csv_tx.vin[0].prevout.hash = spend_tx.GetHash();
|
||||
invalid_with_csv_tx.vin[0].prevout.n = 3;
|
||||
@@ -319,7 +319,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
|
||||
// for the same tx with a different witness.
|
||||
{
|
||||
CMutableTransaction valid_with_witness_tx;
|
||||
valid_with_witness_tx.nVersion = 1;
|
||||
valid_with_witness_tx.version = 1;
|
||||
valid_with_witness_tx.vin.resize(1);
|
||||
valid_with_witness_tx.vin[0].prevout.hash = spend_tx.GetHash();
|
||||
valid_with_witness_tx.vin[0].prevout.n = 1;
|
||||
@@ -344,7 +344,7 @@ BOOST_FIXTURE_TEST_CASE(checkinputs_test, Dersig100Setup)
|
||||
// Test a transaction with multiple inputs.
|
||||
CMutableTransaction tx;
|
||||
|
||||
tx.nVersion = 1;
|
||||
tx.version = 1;
|
||||
tx.vin.resize(2);
|
||||
tx.vin[0].prevout.hash = spend_tx.GetHash();
|
||||
tx.vin[0].prevout.n = 0;
|
||||
|
||||
Reference in New Issue
Block a user