Changeset View
Changeset View
Standalone View
Standalone View
src/test/util/setup_common.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | TestingSetup::TestingSetup(const std::string &chainName) | ||||
: BasicTestingSetup(chainName) { | : BasicTestingSetup(chainName) { | ||||
const Config &config = GetConfig(); | const Config &config = GetConfig(); | ||||
g_rpc_node = &m_node; | g_rpc_node = &m_node; | ||||
const CChainParams &chainparams = config.GetChainParams(); | const CChainParams &chainparams = config.GetChainParams(); | ||||
// Ideally we'd move all the RPC tests to the functional testing framework | // Ideally we'd move all the RPC tests to the functional testing framework | ||||
// instead of unit tests, but for now we need these here. | // instead of unit tests, but for now we need these here. | ||||
RPCServer rpcServer; | RPCServer rpcServer; | ||||
g_rpc_node = &m_node; | |||||
RegisterAllRPCCommands(config, rpcServer, tableRPC); | RegisterAllRPCCommands(config, rpcServer, tableRPC); | ||||
/** | /** | ||||
* RPC does not come out of the warmup state on its own. Normally, this is | * RPC does not come out of the warmup state on its own. Normally, this is | ||||
* handled in bitcoind's init path, but unit tests do not trigger this | * handled in bitcoind's init path, but unit tests do not trigger this | ||||
* codepath, so we call it explicitly as part of setup. | * codepath, so we call it explicitly as part of setup. | ||||
*/ | */ | ||||
std::string rpcWarmupStatus; | std::string rpcWarmupStatus; | ||||
▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines |