From 765c0b364d41e9a251c3f88cbe203645854fd790 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Tue, 26 Mar 2019 16:46:22 +0000 Subject: refactor: combine Chain::findFirstBlockWithTime/findFirstBlockWithTimeAndHeight As suggested in #14711, pass height to CChain::FindEarliestAtLeast to simplify Chain interface by combining findFirstBlockWithTime and findFirstBlockWithTimeAndHeight into one Extend findearliestatleast_edge_test in consequence --- src/chain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/chain.h') diff --git a/src/chain.h b/src/chain.h index 2b6d2d082c..dd9cc2a598 100644 --- a/src/chain.h +++ b/src/chain.h @@ -465,8 +465,8 @@ public: /** Find the last common block between this chain and a block index entry. */ const CBlockIndex *FindFork(const CBlockIndex *pindex) const; - /** Find the earliest block with timestamp equal or greater than the given. */ - CBlockIndex* FindEarliestAtLeast(int64_t nTime) const; + /** Find the earliest block with timestamp equal or greater than the given time and height equal or greater than the given height. */ + CBlockIndex* FindEarliestAtLeast(int64_t nTime, int height) const; }; #endif // BITCOIN_CHAIN_H -- cgit v1.2.3