HomePhabricator

[backport#16839] Avoid using g_rpc_node global in wallet code

Description

[backport#16839] Avoid using g_rpc_node global in wallet code

Summary:
Wallet code should use interfaces::Chain and not directly access to node state.

Add a g_rpc_chain replacement global for wallet code to use, and move
g_rpc_node definition to a libbitcoin_server source file so there are link
errors if wallet code tries to access it.

https://github.com/bitcoin/bitcoin/pull/16839/commits/362ded410b8cb1104b7ef31ff8488fec4824a7d5


Depends on D6418

Concludes backport of Core PR16839

Test Plan:

ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Sep 17 2019, 23:05
majcostaCommitted on Jun 7 2020, 01:51
majcostaPushed on Jun 7 2020, 01:51
Reviewer
Restricted Project
Differential Revision
D6419: [backport#16839] Avoid using g_rpc_node global in wallet code
Parents
rABC49478a329299: [backport#16244] Move wallet creation out of the createwallet rpc into its own…
Branches
Unknown
Tags
Unknown