Page MenuHomePhabricator

stop rewinding post-segwit blocks on startup
ClosedPublic

Authored by markblundeberg on Dec 14 2019, 03:55.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
rem-rewind
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8563
Build 15116: Default Diff Build & Tests
Build 15115: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Dec 16 2019, 13:27

Please sync with @fpelliccioni who's working on this code.

This revision now requires changes to proceed.Dec 16 2019, 13:27
This revision is now accepted and ready to land.Dec 17 2019, 23:46

It seems that removal of the RewindBlockIndex declaration is missing (src/validation.h).

This revision now requires changes to proceed.Dec 18 2019, 14:41

It seems that removal of the RewindBlockIndex declaration is missing (src/validation.h).

Thanks for catching that!

This revision is now accepted and ready to land.Dec 18 2019, 22:10