diff options
| author | Jonas Schnelli <[email protected]> | 2016-12-30 10:35:43 +0100 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2016-12-30 10:37:13 +0100 |
| commit | 9e351c9586ef35366fb0427104e6495e51cb3e6a (patch) | |
| tree | 4ab3e8cabd55cf1b2100d1aedfd45fe1ae72882e /src/wallet/wallet.cpp | |
| parent | Merge #9420: Fix linker error when configured with --enable-lcov (diff) | |
| download | discoin-9e351c9586ef35366fb0427104e6495e51cb3e6a.tar.xz discoin-9e351c9586ef35366fb0427104e6495e51cb3e6a.zip | |
SetMerkleBranch: remove unused code, remove cs_main lock requirement
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 543cfd685..e1c409097 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3736,21 +3736,13 @@ CWalletKey::CWalletKey(int64_t nExpires) nTimeExpires = nExpires; } -int CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock) +void CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock) { - AssertLockHeld(cs_main); - // Update the tx's hashBlock hashBlock = pindex->GetBlockHash(); // set the position of the transaction in the block nIndex = posInBlock; - - // Is the tx in a block that's in the main chain - if (!chainActive.Contains(pindex)) - return 0; - - return chainActive.Height() - pindex->nHeight + 1; } int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const |