Page MenuHomePhabricator

LastCommonAncestor: use skiplist when available
ClosedPublic

Authored by markblundeberg on Jan 26 2020, 05:38.

Details

Summary

We can take advantage of the fact that skip lists use identical heights
on both chains. This function was added back in 2014 (341735eb8f) and
for some reason didn't use the skip lists introduced a few weeks prior
(c9a0918330f31dcb1d5e86b56af63c3f521d3cf2).

Test Plan

ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jan 26 2020, 23:01
src/chain.cpp
184

I just realized this else doesn't actually need to be here (the next two lines can be run immediately even if skip was used, since they satisfy the while condition. Anyway...