diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-01-03 09:31:45 +0100 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2017-01-03 09:31:57 +0100 |
commit | 510c0d9c79a5e85f8f059370739a199d66f21068 (patch) | |
tree | 8f8cf1a250c6c6c3cc4602b182f88d92e5d10c4c /src/wallet/wallet.cpp | |
parent | 53442af0aac3838179fad79a65512ee8c5603922 (diff) | |
parent | 9e351c9586ef35366fb0427104e6495e51cb3e6a (diff) |
Merge #9446: SetMerkleBranch: remove unused code, remove cs_main lock requirement
9e351c9 SetMerkleBranch: remove unused code, remove cs_main lock requirement (Jonas Schnelli)
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 543cfd685e..e1c4090971 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 |