v30.3-roots.1 · Commit 4: [PATCH 04/68] fix(wallet): preserve Roots database hardening on Core 30.3
src/wallet/test/wallet_tests.cpp
Before: src/wallet/test/wallet_tests.cpp · After: src/wallet/test/wallet_tests.cpp
File metadata
index bcff25931a3efe7472311704317b5146f45991a7..b46f8eaff14d250a6bc1c75ee567f11f2bf4a4c5 100644
Download original patch · Release notes
Diff rows 1–23 of 23. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/wallet/test/wallet_tests.cpp
CHANGED
|
@@ -615,9 +615,10 @@ BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup)
|
|
|
615
615
|
});
|
|
616
616
|
std::string error;
|
|
617
617
|
m_coinbase_txns.push_back(CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]);
|
|
618
|
-
auto block_tx = TestSimpleSpend(*m_coinbase_txns[0], 0, coinbaseKey, GetScriptForRawPubKey(key.GetPubKey()));
|
|
618
|
+
const CScript wallet_script{GetScriptForDestination(PKHash{key.GetPubKey()})};
|
|
619
|
+
auto block_tx = TestSimpleSpend(*m_coinbase_txns[0], 0, coinbaseKey, wallet_script);
|
|
619
620
|
m_coinbase_txns.push_back(CreateAndProcessBlock({block_tx}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]);
|
|
620
|
-
auto mempool_tx = TestSimpleSpend(*m_coinbase_txns[1], 0, coinbaseKey, GetScriptForRawPubKey(key.GetPubKey()));
|
|
621
|
+
auto mempool_tx = TestSimpleSpend(*m_coinbase_txns[1], 0, coinbaseKey, wallet_script);
|
|
621
622
|
BOOST_CHECK(m_node.chain->broadcastTransaction(MakeTransactionRef(mempool_tx), DEFAULT_TRANSACTION_MAXFEE, false, error));
|
|
622
623
|
|
|
623
624
|
|
|
@@ -657,9 +658,9 @@ BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup)
|
|
|
657
658
|
auto handler = HandleLoadWallet(context, [&](std::unique_ptr<interfaces::Wallet> wallet) {
|
|
658
659
|
BOOST_CHECK(rescan_completed);
|
|
659
660
|
m_coinbase_txns.push_back(CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]);
|
|
660
|
-
block_tx = TestSimpleSpend(*m_coinbase_txns[2], 0, coinbaseKey, GetScriptForRawPubKey(key.GetPubKey()));
|
|
661
|
+
block_tx = TestSimpleSpend(*m_coinbase_txns[2], 0, coinbaseKey, wallet_script);
|
|
661
662
|
m_coinbase_txns.push_back(CreateAndProcessBlock({block_tx}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]);
|
|
662
|
-
mempool_tx = TestSimpleSpend(*m_coinbase_txns[3], 0, coinbaseKey, GetScriptForRawPubKey(key.GetPubKey()));
|
|
663
|
+
mempool_tx = TestSimpleSpend(*m_coinbase_txns[3], 0, coinbaseKey, wallet_script);
|
|
663
664
|
BOOST_CHECK(m_node.chain->broadcastTransaction(MakeTransactionRef(mempool_tx), DEFAULT_TRANSACTION_MAXFEE, false, error));
|
|
664
665
|
m_node.validation_signals->SyncWithValidationInterfaceQueue();
|
|
665
666
|
});
|