Page MenuHomePhabricator

[backport#16503] Remove p2pEnabled from Chain interface
ClosedPublic

Authored by majcosta on Sep 4 2020, 19:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa4830c0892a2: [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

Diff Detail

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

Event Timeline

majcosta requested review of this revision.Sep 4 2020, 19:16

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.Sep 4 2020, 20:31
This revision was landed with ongoing or failed builds.Sep 5 2020, 02:17
This revision was automatically updated to reflect the committed changes.