HomePhabricator

[backport#16503] Remove p2pEnabled from Chain interface

Description

[backport#16503] Remove p2pEnabled from Chain interface

Summary:
Remove p2pEnabled from Chain interface (Antoine Riard)

Pull request description:

RPC server starts in warmup mode, it can't process yet calls, then follows connection manager initialization and finally RPC server get out of warmup mode. RPC calls shouldn't be able to get P2P disabled errors because once we initialize g_connman it's not unset until shutdown, after RPC server has been stopped.

@mzumsande comment in #15713 let me thought that `p2pEnabled` was maybe useless, `g_connman` is always initialized before RPC server is getting out of warmup. These checks against P2P state were introduced in https://github.com/bitcoin/bitcoin/pull/8085/commits/5b446dd5b11d4f403554bc2dd5a7a94c7d20422a.

Backport of Core PR16503

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Aug 9 2019, 13:46
majcostaCommitted on Sep 5 2020, 02:16
majcostaPushed on Sep 5 2020, 02:17
Reviewer
Restricted Project
Differential Revision
D7369: [backport#16503] Remove p2pEnabled from Chain interface
Parents
rABC147355c881a5: [backport#16144] wallet: do not encrypt wallets with disabled private keys
Branches
Unknown
Tags
Unknown