aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorr8921039 <r8921039@hotmail.com>2019-03-24 14:54:40 -0700
committerr8921039 <r8921039@hotmail.com>2019-03-25 14:28:05 -0700
commitc968780785c18bd6d0a8659c9e251ccf8fdc91dc (patch)
tree6293667e17d14150e31f9c3af7c75c564494600a /src
parent7b13c646457980f44599412f243694fa682a1abf (diff)
downloadbitcoin-c968780785c18bd6d0a8659c9e251ccf8fdc91dc.tar.xz
[docs] fix comment: the return value of findFork is _not_ an ancestor when the specified block is on the active chain
update with suggested comment text from the reviewers
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/chain.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h
index a9b05f27fc..ae546c4150 100644
--- a/src/interfaces/chain.h
+++ b/src/interfaces/chain.h
@@ -120,8 +120,9 @@ public:
//! nullopt if no block in the range is pruned. Range is inclusive.
virtual Optional<int> findPruned(int start_height = 0, Optional<int> stop_height = nullopt) = 0;
- //! Return height of the highest block on the chain that is an ancestor
- //! of the specified block, or nullopt if no common ancestor is found.
+ //! 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.
//! Also return the height of the specified block as an optional output
//! parameter (to avoid the cost of a second hash lookup in case this
//! information is desired).
@@ -135,9 +136,9 @@ public:
//! Get locator for the current chain tip.
virtual CBlockLocator getTipLocator() = 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.
+ //! 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.
virtual Optional<int> findLocatorFork(const CBlockLocator& locator) = 0;
//! Check if transaction will be final given chain height current time.