diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chain.cpp | 5 | ||||
-rw-r--r-- | src/chain.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/chain.cpp b/src/chain.cpp index 05427a4569..56ed22ce71 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -9,17 +9,16 @@ using namespace std; // CChain implementation -CBlockIndex *CChain::SetTip(CBlockIndex *pindex) { +void CChain::SetTip(CBlockIndex *pindex) { if (pindex == NULL) { vChain.clear(); - return NULL; + return; } vChain.resize(pindex->nHeight + 1); while (pindex && vChain[pindex->nHeight] != pindex) { vChain[pindex->nHeight] = pindex; pindex = pindex->pprev; } - return pindex; } CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const { diff --git a/src/chain.h b/src/chain.h index 4e6a466c6a..0533eeb730 100644 --- a/src/chain.h +++ b/src/chain.h @@ -395,8 +395,8 @@ public: return vChain.size() - 1; } - /** Set/initialize a chain with a given tip. Returns the forking point. */ - CBlockIndex *SetTip(CBlockIndex *pindex); + /** Set/initialize a chain with a given tip. */ + void SetTip(CBlockIndex *pindex); /** Return a CBlockLocator that refers to a block in this chain (by default the tip). */ CBlockLocator GetLocator(const CBlockIndex *pindex = NULL) const; |