aboutsummaryrefslogtreecommitdiff
path: root/src/chain.h
diff options
context:
space:
mode:
authorAntoine Riard <ariard@student.42.fr>2019-03-26 16:46:22 +0000
committerAntoine Riard <ariard@student.42.fr>2019-03-27 18:29:48 -0400
commit765c0b364d41e9a251c3f88cbe203645854fd790 (patch)
tree6d6daaaba9d8f8f22eddaf4882f5c26db82b71c5 /src/chain.h
parent8a8b03ecd2218dcdbcbf3127f2fa94f0f0da4698 (diff)
downloadbitcoin-765c0b364d41e9a251c3f88cbe203645854fd790.tar.xz
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
Diffstat (limited to 'src/chain.h')
-rw-r--r--src/chain.h4
1 files changed, 2 insertions, 2 deletions
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