Page MenuHomePhabricator

refactor: Add and use EnsureConnman in rpc code
ClosedPublic

Authored by PiRK on Nov 30 2022, 14:58.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb5814dc5fcda: refactor: Add and use EnsureConnman in rpc code
Summary

This concludes backport of core#21719
https://github.com/bitcoin/bitcoin/pull/21719/commits/fafb68add5e16e8bd5b9428bcffcaee2639747cf

Depends on D12699

Note: in D7990, in getnodeaddresses and setnetworkactive, the if (!node.connman) test were replaced by if (!node.banman). As far as I can tell, this is a mistake, so I reverted to the if (!node.connman) solution to stay closer to the source material and remove 2 more blocks of boilerplate code. I don't think this matters anyway, as both the connman and the banman are always unconditionally created in AppInitMain, so I don't see how either one of them can be unavailable in the context of a RPC call.

Test Plan

ninja all check-all

Diff Detail

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