mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 10:42:46 +01:00
refactor: Pass NodeContext to RPC and REST methods through util::Ref
This commit does not change behavior
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <noui.h>
|
||||
#include <shutdown.h>
|
||||
#include <ui_interface.h>
|
||||
#include <util/ref.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
#include <util/threadnames.h>
|
||||
@@ -77,6 +78,7 @@ static bool AppInit(int argc, char* argv[])
|
||||
return true;
|
||||
}
|
||||
|
||||
util::Ref context{node};
|
||||
try
|
||||
{
|
||||
if (!CheckDataDirOption()) {
|
||||
@@ -145,7 +147,7 @@ static bool AppInit(int argc, char* argv[])
|
||||
// If locking the data directory failed, exit immediately
|
||||
return false;
|
||||
}
|
||||
fRet = AppInitMain(node);
|
||||
fRet = AppInitMain(context, node);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
PrintExceptionContinue(&e, "AppInit()");
|
||||
|
||||
Reference in New Issue
Block a user