[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
This commit is contained in:
r8921039 2019-03-24 14:54:40 -07:00
parent 7b13c64645
commit c968780785

View file

@ -120,8 +120,9 @@ public:
//! nullopt if no block in the range is pruned. Range is inclusive. //! 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; 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 //! Return height of the specified block if it is on the chain, otherwise
//! of the specified block, or nullopt if no common ancestor is found. //! 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 //! 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 //! parameter (to avoid the cost of a second hash lookup in case this
//! information is desired). //! information is desired).
@ -135,9 +136,9 @@ public:
//! Get locator for the current chain tip. //! Get locator for the current chain tip.
virtual CBlockLocator getTipLocator() = 0; virtual CBlockLocator getTipLocator() = 0;
//! Return height of the latest block common to locator and chain, which //! Return height of the highest block on chain in common with the locator,
//! is guaranteed to be an ancestor of the block used to create the //! which will either be the original block used to create the locator,
//! locator. //! or one of its ancestors.
virtual Optional<int> findLocatorFork(const CBlockLocator& locator) = 0; virtual Optional<int> findLocatorFork(const CBlockLocator& locator) = 0;
//! Check if transaction will be final given chain height current time. //! Check if transaction will be final given chain height current time.