refactor: Pass NodeContext to RPC and REST methods through util::Ref

This commit does not change behavior
This commit is contained in:
Russell Yanofsky
2020-04-17 11:28:45 -04:00
parent 691c817b34
commit 6fca33b2ed
17 changed files with 150 additions and 86 deletions

View File

@@ -5,11 +5,14 @@
#ifndef BITCOIN_HTTPRPC_H
#define BITCOIN_HTTPRPC_H
namespace util {
class Ref;
} // namespace util
/** Start HTTP RPC subsystem.
* Precondition; HTTP and RPC has been started.
*/
bool StartHTTPRPC();
bool StartHTTPRPC(const util::Ref& context);
/** Interrupt HTTP RPC subsystem.
*/
void InterruptHTTPRPC();
@@ -21,7 +24,7 @@ void StopHTTPRPC();
/** Start HTTP REST subsystem.
* Precondition; HTTP and RPC has been started.
*/
void StartREST();
void StartREST(const util::Ref& context);
/** Interrupt RPC REST subsystem.
*/
void InterruptREST();