diff options
| author | Russell Yanofsky <[email protected]> | 2020-04-17 11:28:45 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2020-05-13 16:20:13 -0400 |
| commit | 6fca33b2edc09ed62dab2323c780b31585de1750 (patch) | |
| tree | 32b5eb4a502b676b3d71bbb168095b93871311b6 /src/bitcoind.cpp | |
| parent | Add util::Ref class as temporary alternative for c++17 std::any (diff) | |
| download | discoin-6fca33b2edc09ed62dab2323c780b31585de1750.tar.xz discoin-6fca33b2edc09ed62dab2323c780b31585de1750.zip | |
refactor: Pass NodeContext to RPC and REST methods through util::Ref
This commit does not change behavior
Diffstat (limited to 'src/bitcoind.cpp')
| -rw-r--r-- | src/bitcoind.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 43d3f3c5a..b8e871789 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -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()"); |