diff options
| author | Daniel Kraft <[email protected]> | 2014-10-24 16:13:41 +0200 |
|---|---|---|
| committer | Daniel Kraft <[email protected]> | 2014-10-24 16:13:41 +0200 |
| commit | a31e8bad53e44629b26e7f36e0431b9fa01c1ed6 (patch) | |
| tree | ba360bbcb5471fbc049dc1e0abe225e683baa6f7 /src/wallet.cpp | |
| parent | Merge pull request #5128 (diff) | |
| download | discoin-a31e8bad53e44629b26e7f36e0431b9fa01c1ed6.tar.xz discoin-a31e8bad53e44629b26e7f36e0431b9fa01c1ed6.zip | |
Make CBlockIndex* returned by GetDepthInMainChain const.
Make the CBlockIndex* (optionally) returned by GetDepthInMainChain
const. This prevents accidental modification. The result is for
reading its properties rather than modifying it.
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 65944587f..3812c22fe 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -2298,7 +2298,7 @@ int CMerkleTx::SetMerkleBranch(const CBlock& block) return chainActive.Height() - pindex->nHeight + 1; } -int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const +int CMerkleTx::GetDepthInMainChainINTERNAL(const CBlockIndex* &pindexRet) const { if (hashBlock == 0 || nIndex == -1) return 0; @@ -2324,7 +2324,7 @@ int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const return chainActive.Height() - pindex->nHeight + 1; } -int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const +int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const { AssertLockHeld(cs_main); int nResult = GetDepthInMainChainINTERNAL(pindexRet); |