diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-07-27 10:08:31 -0400 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-01-15 12:42:00 -0400 |
commit | 700c42b85d20e624bef4228eef062c93084efab5 (patch) | |
tree | 60f0213d9b6671995ae6e7d2015d57ffdda89f4b /src/wallet/test | |
parent | eb2aecfb80662a91c649ea1455d9812ced05c323 (diff) |
Add height, depth, and hash methods to the Chain interface
And use them to remove uses of chainActive and mapBlockIndex in wallet code
This commit does not change behavior.
Co-authored-by: Ben Woosley <ben.woosley@gmail.com>
Diffstat (limited to 'src/wallet/test')
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 0db22cf6fe..4377e9f29d 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -276,7 +276,7 @@ static int64_t AddTx(CWallet& wallet, uint32_t lockTime, int64_t mockTime, int64 CWalletTx wtx(&wallet, MakeTransactionRef(tx)); if (block) { - wtx.SetMerkleBranch(block, 0); + wtx.SetMerkleBranch(block->GetBlockHash(), 0); } { LOCK(cs_main); @@ -372,7 +372,7 @@ public: LOCK(wallet->cs_wallet); auto it = wallet->mapWallet.find(tx->GetHash()); BOOST_CHECK(it != wallet->mapWallet.end()); - it->second.SetMerkleBranch(chainActive.Tip(), 1); + it->second.SetMerkleBranch(chainActive.Tip()->GetBlockHash(), 1); return it->second; } |