Page MenuHomePhabricator

use ChainstateManager to initialize chainstate
ClosedPublic

Authored by Fabien on Nov 27 2020, 15:59.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABCaa2a535f9b1c: use ChainstateManager to initialize chainstate
Summary
This allows us to easily initialize multiple chainstates on startup in
future commits. It retires the g_chainstate global in lieu of
g_chainman.

Partial backport (3/5) of core PR17737:
https://github.com/bitcoin/bitcoin/pull/17737/commits/4ae29f5f0c5117032debb722d7049664fdceeae8

Includes a fix to qt/test/apptests.cpp from the next commit to unbreak
the bitcoin-qt tests:
https://github.com/bitcoin/bitcoin/pull/17737/commits/2b081c4568e8019886fdb0f2a57babc73d7487f7#diff-41e328d9ba5879d2bd026a700743339b5b300b9bee50844795ef9e27f60bdfb8R85

Depends on D8538.

Test Plan
ninja all check-all

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Nov 27 2020, 15:59
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
src/init.cpp
2436 ↗(On Diff #26064)

????

This revision is now accepted and ready to land.Nov 27 2020, 17:42
src/init.cpp
2436 ↗(On Diff #26064)

It's set in the catch block, so needs to be scoped accordingly. In the PR it is the same but they have 2 try/catch blocks.