Avoid using g_rpc_node global in wallet code

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.
This commit is contained in:
Russell Yanofsky
2019-09-17 19:05:26 -04:00
parent 8922d7f6b7
commit 362ded410b
10 changed files with 28 additions and 12 deletions

View File

@@ -13,6 +13,7 @@
#include <netbase.h>
#include <node/context.h>
#include <policy/settings.h>
#include <rpc/blockchain.h>
#include <rpc/protocol.h>
#include <rpc/util.h>
#include <sync.h>