HomePhabricator

AreOnTheSameFork: don't actually need to find common ancestor

Description

AreOnTheSameFork: don't actually need to find common ancestor

Summary:
We don't actually need to know what is the common ancestor (which may
require iterating over many blocks below pa and pb). It's enough to
just perform the initial phase from LastCommonAncestor, which is
what this new code does.

Test Plan: ninja check-all

Reviewers: jasonbcox, #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5068

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Jan 26 2020, 05:41
markblundebergPushed on Jan 28 2020, 11:57
Reviewer
Restricted Project
Differential Revision
D5068: AreOnTheSameFork: don't actually need to find common ancestor
Parents
rABC02caabba2898: FinalizeBlockAndInvalidate: just use chainActive
Branches
Unknown
Tags
Unknown

Event Timeline