From fa1a92224dd78de817d15bcda35a8310254e1a54 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 6 Apr 2020 00:21:33 +0800 Subject: rpc: Avoid initialization-order-fiasco on static CRPCCommand tables --- src/rpc/mining.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc/mining.cpp') diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index bde19d8e79..da9d583fa7 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1022,6 +1022,8 @@ static UniValue estimaterawfee(const JSONRPCRequest& request) return result; } +void RegisterMiningRPCCommands(CRPCTable &t) +{ // clang-format off static const CRPCCommand commands[] = { // category name actor (function) argNames @@ -1043,8 +1045,6 @@ static const CRPCCommand commands[] = }; // clang-format on -void RegisterMiningRPCCommands(CRPCTable &t) -{ for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) t.appendCommand(commands[vcidx].name, &commands[vcidx]); } -- cgit v1.2.3