diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2019-01-08 00:06:24 -0800 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2019-01-15 08:42:00 -0800 |
commit | 44de1561aaf7556bb8ae8b582c233742ff76767d (patch) | |
tree | 9b4497111bdfb87a5b37516283ee21a37f852440 /src/interfaces/chain.h | |
parent | db21f0264855406c9b6ec4c084a15988c5c71b32 (diff) | |
download | bitcoin-44de1561aaf7556bb8ae8b582c233742ff76767d.tar.xz |
Remove remaining chainActive references from CWallet
This commit does not change behavior.
Co-authored-by: Ben Woosley <ben.woosley@gmail.com>
Diffstat (limited to 'src/interfaces/chain.h')
-rw-r--r-- | src/interfaces/chain.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index aef81675e0..735d5b60df 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -15,6 +15,7 @@ class CBlock; class CScheduler; class uint256; +struct CBlockLocator; namespace interfaces { @@ -58,6 +59,10 @@ public: //! will abort. virtual int64_t getBlockMedianTimePast(int height) = 0; + //! Check that the block is available on disk (i.e. has not been + //! pruned), and contains transactions. + virtual bool haveBlockOnDisk(int height) = 0; + //! Return height of the first block in the chain with timestamp equal //! or greater than the given time, or nullopt if there is no block with //! a high enough timestamp. Also return the block hash as an optional @@ -84,6 +89,19 @@ public: //! parameter (to avoid the cost of a second hash lookup in case this //! information is desired). virtual Optional<int> findFork(const uint256& hash, Optional<int>* height) = 0; + + //! Return true if block hash points to the current chain tip, or to a + //! possible descendant of the current chain tip that isn't currently + //! connected. + virtual bool isPotentialTip(const uint256& hash) = 0; + + //! Get locator for the current chain tip. + virtual CBlockLocator getLocator() = 0; + + //! Return height of the latest block common to locator and chain, which + //! is guaranteed to be an ancestor of the block used to create the + //! locator. + virtual Optional<int> findLocatorFork(const CBlockLocator& locator) = 0; }; //! Return Lock interface. Chain is locked when this is called, and |