Interface for querying locked chain state, used by legacy code that assumes state won't change between calls.
More...
|
virtual | ~Lock () |
|
virtual Optional< int > | getHeight ()=0 |
| Get current chain height, not including genesis block (returns 0 if chain only contains genesis block, nullopt if chain does not contain any blocks). More...
|
|
virtual Optional< int > | getBlockHeight (const uint256 &hash)=0 |
| Get block height above genesis block. More...
|
|
virtual uint256 | getBlockHash (int height)=0 |
| Get block hash. Height must be valid or this function will abort. More...
|
|
virtual bool | haveBlockOnDisk (int height)=0 |
| Check that the block is available on disk (i.e. More...
|
|
virtual Optional< int > | findFirstBlockWithTimeAndHeight (int64_t time, int height, uint256 *hash)=0 |
| Return height of the first block in the chain with timestamp equal or greater than the given time and height equal or greater than the given height, or nullopt if there is no block with a high enough timestamp and height. More...
|
|
virtual Optional< int > | findFork (const uint256 &hash, Optional< int > *height)=0 |
| Return height of the specified block if it is on the chain, otherwise return the height of the highest block on chain that's an ancestor of the specified block, or nullopt if there is no common ancestor. More...
|
|
virtual CBlockLocator | getTipLocator ()=0 |
| Get locator for the current chain tip. More...
|
|
virtual Optional< int > | findLocatorFork (const CBlockLocator &locator)=0 |
| Return height of the highest block on chain in common with the locator, which will either be the original block used to create the locator, or one of its ancestors. More...
|
|
virtual bool | checkFinalTx (const CTransaction &tx)=0 |
| Check if transaction will be final given chain height current time. More...
|
|
Interface for querying locked chain state, used by legacy code that assumes state won't change between calls.
New code should avoid using the Lock interface and instead call higher-level Chain methods that return more information so the chain doesn't need to stay locked between calls.
Definition at line 85 of file chain.h.