HomePhabricator

stop rewinding post-segwit blocks on startup

Description

stop rewinding post-segwit blocks on startup

Summary:
This seems to have been missed in the original removal of segwit.

Introduced in the segwit PR8149, RewindBlockIndex carefully takes care
that when we upgrade to segwit, we erase post-ugprade blocks which could
be missing witness data.

Since segwit doesn't activate ever, this function does nothing but slow
down startup negligibly, by unnecessarily flushing the state to disk. It's
also a lot of untested code which means if we ever need it for something
else, the code is likely to be in a broken state.

Test Plan:

make check
test_runner.py

Reviewers: fpelliccioni, Fabien, #bitcoin_abc, deadalnix

Reviewed By: fpelliccioni, #bitcoin_abc, deadalnix

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

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Dec 14 2019, 02:56
markblundebergPushed on Dec 18 2019, 22:11
Reviewer
Restricted Project
Differential Revision
D4728: stop rewinding post-segwit blocks on startup
Parents
rABC3a6fe217920a: [backport] gui: Show messages as text not html
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <markblundeberg@users.noreply.github.com> committed rABC020c850001ae: stop rewinding post-segwit blocks on startup (authored by Mark Lundeberg <markblundeberg@users.noreply.github.com>).Dec 18 2019, 22:11