diff options
| author | Russell Yanofsky <[email protected]> | 2017-07-27 10:08:31 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2019-01-15 12:42:00 -0400 |
| commit | 700c42b85d20e624bef4228eef062c93084efab5 (patch) | |
| tree | 60f0213d9b6671995ae6e7d2015d57ffdda89f4b /src/wallet/test | |
| parent | Merge #14433: Add checksum in gitian build scripts for ossl (diff) | |
| download | discoin-700c42b85d20e624bef4228eef062c93084efab5.tar.xz discoin-700c42b85d20e624bef4228eef062c93084efab5.zip | |
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 <[email protected]>
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 0db22cf6f..4377e9f29 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; } |