scripted-diff: Rename InitInterfaces to NodeContext

-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; }

s 'struct InitInterfaces'              'struct NodeContext'
s 'InitInterfaces interfaces'          'NodeContext node'
s 'InitInterfaces& interfaces'         'NodeContext\& node'
s 'InitInterfaces m_interfaces'        'NodeContext m_context'
s 'InitInterfaces\* g_rpc_interfaces'  'NodeContext* g_rpc_node'
s 'g_rpc_interfaces = &interfaces'     'g_rpc_node = \&node'
s 'g_rpc_interfaces'                   'g_rpc_node'
s 'm_interfaces'                       'm_context'
s 'interfaces\.chain'                  'node.chain'
s '\(AppInitMain\|Shutdown\|Construct\)(interfaces)' '\1(node)'
s 'init interfaces' 'chain clients'
-END VERIFY SCRIPT-
This commit is contained in:
Russell Yanofsky
2019-09-17 17:04:39 -04:00
parent cfec3e01b4
commit 301bd41a2e
11 changed files with 41 additions and 41 deletions

View File

@@ -16,7 +16,7 @@ class ChainClient;
} // namespace interfaces
//! Pointers to interfaces used during init and destroyed on shutdown.
struct InitInterfaces
struct NodeContext
{
std::unique_ptr<interfaces::Chain> chain;
std::vector<std::unique_ptr<interfaces::ChainClient>> chain_clients;
@@ -29,7 +29,7 @@ class thread_group;
/** Interrupt threads */
void Interrupt();
void Shutdown(InitInterfaces& interfaces);
void Shutdown(NodeContext& node);
//!Initialize the logging infrastructure
void InitLogging();
//!Parameter interaction: change current parameters depending on various rules
@@ -63,7 +63,7 @@ bool AppInitLockDataDirectory();
* @note This should only be done after daemonization. Call Shutdown() if this function fails.
* @pre Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called.
*/
bool AppInitMain(InitInterfaces& interfaces);
bool AppInitMain(NodeContext& node);
/**
* Setup the arguments for gArgs