diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h --- a/src/test/test_bitcoin.h +++ b/src/test/test_bitcoin.h @@ -104,7 +104,7 @@ ~TestChain100Setup(); // For convenience, coinbase transactions. - std::vector coinbaseTxns; + std::vector m_coinbase_txns; // private/public key needed to spend coinbase transactions. CKey coinbaseKey; }; diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp --- a/src/test/test_bitcoin.cpp +++ b/src/test/test_bitcoin.cpp @@ -155,7 +155,7 @@ for (int i = 0; i < COINBASE_MATURITY; i++) { std::vector noTxns; CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey); - coinbaseTxns.push_back(*b.vtx[0]); + m_coinbase_txns.push_back(*b.vtx[0]); } } diff --git a/src/test/txindex_tests.cpp b/src/test/txindex_tests.cpp --- a/src/test/txindex_tests.cpp +++ b/src/test/txindex_tests.cpp @@ -20,7 +20,7 @@ uint256 block_hash; // Transaction should not be found in the index before it is started. - for (const auto &txn : coinbaseTxns) { + for (const auto &txn : m_coinbase_txns) { BOOST_CHECK(!txindex.FindTx(txn.GetHash(), block_hash, tx_disk)); } @@ -39,7 +39,7 @@ } // Check that txindex has all txs that were in the chain before it started. - for (const auto &txn : coinbaseTxns) { + for (const auto &txn : m_coinbase_txns) { if (!txindex.FindTx(txn.GetHash(), block_hash, tx_disk)) { BOOST_ERROR("FindTx failed"); } else if (tx_disk->GetHash() != txn.GetHash()) { diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp --- a/src/test/txvalidationcache_tests.cpp +++ b/src/test/txvalidationcache_tests.cpp @@ -47,7 +47,7 @@ for (int i = 0; i < 2; i++) { spends[i].nVersion = 1; spends[i].vin.resize(1); - spends[i].vin[0].prevout = COutPoint(coinbaseTxns[0].GetId(), 0); + spends[i].vin[0].prevout = COutPoint(m_coinbase_txns[0].GetId(), 0); spends[i].vout.resize(1); spends[i].vout[0].nValue = 11 * CENT; spends[i].vout[0].scriptPubKey = scriptPubKey; @@ -56,7 +56,7 @@ std::vector vchSig; uint256 hash = SignatureHash(scriptPubKey, CTransaction(spends[i]), 0, SigHashType().withForkId(), - coinbaseTxns[0].vout[0].nValue); + m_coinbase_txns[0].vout[0].nValue); BOOST_CHECK(coinbaseKey.SignECDSA(hash, vchSig)); vchSig.push_back(uint8_t(SIGHASH_ALL | SIGHASH_FORKID)); spends[i].vin[0].scriptSig << vchSig; @@ -178,7 +178,7 @@ mutableFunding_tx.nVersion = 1; mutableFunding_tx.vin.resize(1); mutableFunding_tx.vin[0].prevout = - COutPoint(coinbaseTxns[0].GetId(), 0); + COutPoint(m_coinbase_txns[0].GetId(), 0); mutableFunding_tx.vout.resize(1); mutableFunding_tx.vout[0].nValue = 50 * COIN; @@ -191,7 +191,7 @@ std::vector nullDummyVchSig; uint256 nulldummySigHash = SignatureHash( p2pk_scriptPubKey, CTransaction(mutableFunding_tx), 0, - SigHashType().withForkId(), coinbaseTxns[0].vout[0].nValue); + SigHashType().withForkId(), m_coinbase_txns[0].vout[0].nValue); BOOST_CHECK(coinbaseKey.SignECDSA(nulldummySigHash, nullDummyVchSig)); nullDummyVchSig.push_back(uint8_t(SIGHASH_ALL | SIGHASH_FORKID)); mutableFunding_tx.vin[0].scriptSig << nullDummyVchSig; diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -126,11 +126,11 @@ // will pick up both blocks, not just the first. const int64_t BLOCK_TIME = chainActive.Tip()->GetBlockTimeMax() + 5; SetMockTime(BLOCK_TIME); - coinbaseTxns.emplace_back( + m_coinbase_txns.emplace_back( *CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())) .vtx[0]); - coinbaseTxns.emplace_back( + m_coinbase_txns.emplace_back( *CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())) .vtx[0]); @@ -139,7 +139,7 @@ // rescan will start at the block time. const int64_t KEY_TIME = BLOCK_TIME + TIMESTAMP_WINDOW; SetMockTime(KEY_TIME); - coinbaseTxns.emplace_back( + m_coinbase_txns.emplace_back( *CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())) .vtx[0]); @@ -174,9 +174,9 @@ LOCK(wallet.cs_wallet); BOOST_CHECK_EQUAL(wallet.mapWallet.size(), 3); - BOOST_CHECK_EQUAL(coinbaseTxns.size(), 103); - for (size_t i = 0; i < coinbaseTxns.size(); ++i) { - bool found = wallet.GetWalletTx(coinbaseTxns[i].GetId()); + BOOST_CHECK_EQUAL(m_coinbase_txns.size(), 103); + for (size_t i = 0; i < m_coinbase_txns.size(); ++i) { + bool found = wallet.GetWalletTx(m_coinbase_txns[i].GetId()); bool expected = i >= 100; BOOST_CHECK_EQUAL(found, expected); } @@ -194,7 +194,7 @@ // debit functions. BOOST_FIXTURE_TEST_CASE(coin_mark_dirty_immature_credit, TestChain100Setup) { CWallet wallet(Params(), "dummy", CWalletDBWrapper::CreateDummy()); - CWalletTx wtx(&wallet, MakeTransactionRef(coinbaseTxns.back())); + CWalletTx wtx(&wallet, MakeTransactionRef(m_coinbase_txns.back())); LOCK2(cs_main, wallet.cs_wallet); wtx.hashBlock = chainActive.Tip()->GetBlockHash(); wtx.nIndex = 0;