HomePhabricator

init: Factor out AppInitLockDataDirectory

Description

init: Factor out AppInitLockDataDirectory

Summary:
Alternative to #10818, alternative solution to #10815.

After this change: All the AppInit steps before and inclusive
AppInitLockDataDirectory must not have Shutdown() called in case of
failure. Only when AppInitMain fails, Shutdown should be called.

Changes the GUI and bitcoind code to consistently do this.

Backport of Core PR 10832.
Completes T426

Co-authored-by: Jason B. Cox <contact@jasonbcox.com>

Test Plan: ninja && test_runner.py

Reviewers: deadalnix, schancel, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Subscribers: teamcity

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 15 2017, 08:46
jasonbcoxCommitted on Oct 16 2018, 17:30
jasonbcoxPushed on Oct 16 2018, 17:30
Reviewer
Restricted Project
Differential Revision
D1928: init: Factor out AppInitLockDataDirectory
Parents
rABC91bbd0a379d2: Make construction of object explicit in sync.h
Branches
Unknown
Tags
Unknown

Event Timeline