diff options
| author | MarcoFalke <[email protected]> | 2020-04-06 00:21:33 +0800 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-04-06 00:20:00 +0800 |
| commit | fa1a92224dd78de817d15bcda35a8310254e1a54 (patch) | |
| tree | fdd68fce9512d84fc87b37f909be99a700fe8d88 /src/wallet | |
| parent | Merge #18510: fuzz: Add CScriptNum::getint coverage (diff) | |
| download | discoin-fa1a92224dd78de817d15bcda35a8310254e1a54.tar.xz discoin-fa1a92224dd78de817d15bcda35a8310254e1a54.zip | |
rpc: Avoid initialization-order-fiasco on static CRPCCommand tables
Diffstat (limited to 'src/wallet')
| -rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d8b3b57b6..964e48096 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4242,6 +4242,8 @@ UniValue importprunedfunds(const JSONRPCRequest& request); UniValue removeprunedfunds(const JSONRPCRequest& request); UniValue importmulti(const JSONRPCRequest& request); +void RegisterWalletRPCCommands(interfaces::Chain& chain, std::vector<std::unique_ptr<interfaces::Handler>>& handlers) +{ // clang-format off static const CRPCCommand commands[] = { // category name actor (function) argNames @@ -4305,8 +4307,6 @@ static const CRPCCommand commands[] = }; // clang-format on -void RegisterWalletRPCCommands(interfaces::Chain& chain, std::vector<std::unique_ptr<interfaces::Handler>>& handlers) -{ for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) handlers.emplace_back(chain.handleRpc(commands[vcidx])); } |