Implement "getchaintips" RPC command to monitor blockchain forks.

Port over https://github.com/chronokings/huntercoin/pull/19 from
Huntercoin:  This implements a new RPC command "getchaintips" that can be
used to find all currently active chain heads.  This is similar to the
-printblocktree startup option, but it can be used without restarting
just via the RPC interface on a running daemon.
This commit is contained in:
Daniel Kraft
2014-08-03 18:12:19 +02:00
parent 6278bd57c6
commit b33bd7a3be
6 changed files with 100 additions and 4 deletions

View File

@@ -1068,7 +1068,7 @@ public:
CBlockIndex *FindFork(const CBlockLocator &locator) const;
/** Find the last common block between this chain and a block index entry. */
CBlockIndex *FindFork(CBlockIndex *pindex) const;
const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
};
/** The currently-connected chain of blocks. */