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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.Dec 14 2019, 03:55
Herald added a reviewer: Restricted Project. · View Herald TranscriptDec 14 2019, 03:55
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
deadalnix accepted this revision.Dec 17 2019, 23:46
This revision is now accepted and ready to land.Dec 17 2019, 23:46
fpelliccioni accepted this revision.Dec 18 2019, 13:57
fpelliccioni requested changes to this revision.Dec 18 2019, 14:41

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

missed removing from header

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

Thanks for catching that!

fpelliccioni accepted this revision as: fpelliccioni.Dec 18 2019, 17:48
fpelliccioni accepted this revision.Dec 18 2019, 22:10
This revision is now accepted and ready to land.Dec 18 2019, 22:10