Drop unused pindexRet arg to CMerkleTx::GetDepthInMainChain
This commit is contained in:
parent
fad42e8c4a
commit
d6f39b6c64
2 changed files with 3 additions and 5 deletions
|
@ -4416,7 +4416,7 @@ void CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock)
|
||||||
nIndex = posInBlock;
|
nIndex = posInBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const
|
int CMerkleTx::GetDepthInMainChain() const
|
||||||
{
|
{
|
||||||
if (hashUnset())
|
if (hashUnset())
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4428,7 +4428,6 @@ int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const
|
||||||
if (!pindex || !chainActive.Contains(pindex))
|
if (!pindex || !chainActive.Contains(pindex))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pindexRet = pindex;
|
|
||||||
return ((nIndex == -1) ? (-1) : 1) * (chainActive.Height() - pindex->nHeight + 1);
|
return ((nIndex == -1) ? (-1) : 1) * (chainActive.Height() - pindex->nHeight + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,9 +267,8 @@ public:
|
||||||
* 0 : in memory pool, waiting to be included in a block
|
* 0 : in memory pool, waiting to be included in a block
|
||||||
* >=1 : this many blocks deep in the main chain
|
* >=1 : this many blocks deep in the main chain
|
||||||
*/
|
*/
|
||||||
int GetDepthInMainChain(const CBlockIndex* &pindexRet) const;
|
int GetDepthInMainChain() const;
|
||||||
int GetDepthInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
|
bool IsInMainChain() const { return GetDepthInMainChain() > 0; }
|
||||||
bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet) > 0; }
|
|
||||||
int GetBlocksToMaturity() const;
|
int GetBlocksToMaturity() const;
|
||||||
bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); }
|
bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); }
|
||||||
bool isAbandoned() const { return (hashBlock == ABANDON_HASH); }
|
bool isAbandoned() const { return (hashBlock == ABANDON_HASH); }
|
||||||
|
|
Loading…
Add table
Reference in a new issue