Browse Source

Merge #8163: Do not shadow global RPC table variable (tableRPC)

de1bbe3 Do not shadow global RPC table variable (tableRPC) (Pavel Janík)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
0c8875d23b
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 4
      src/rpc/blockchain.cpp
  2. 4
      src/rpc/mining.cpp
  3. 4
      src/rpc/misc.cpp
  4. 4
      src/rpc/net.cpp
  5. 4
      src/rpc/rawtransaction.cpp
  6. 12
      src/rpc/register.h
  7. 4
      src/wallet/rpcwallet.cpp
  8. 2
      src/wallet/rpcwallet.h

4
src/rpc/blockchain.cpp

@ -1205,8 +1205,8 @@ static const CRPCCommand commands[] =
{ "hidden", "reconsiderblock", &reconsiderblock, true }, { "hidden", "reconsiderblock", &reconsiderblock, true },
}; };
void RegisterBlockchainRPCCommands(CRPCTable &tableRPC) void RegisterBlockchainRPCCommands(CRPCTable &t)
{ {
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); t.appendCommand(commands[vcidx].name, &commands[vcidx]);
} }

4
src/rpc/mining.cpp

@ -919,8 +919,8 @@ static const CRPCCommand commands[] =
{ "util", "estimatesmartpriority", &estimatesmartpriority, true }, { "util", "estimatesmartpriority", &estimatesmartpriority, true },
}; };
void RegisterMiningRPCCommands(CRPCTable &tableRPC) void RegisterMiningRPCCommands(CRPCTable &t)
{ {
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); t.appendCommand(commands[vcidx].name, &commands[vcidx]);
} }

4
src/rpc/misc.cpp

@ -498,8 +498,8 @@ static const CRPCCommand commands[] =
{ "hidden", "setmocktime", &setmocktime, true }, { "hidden", "setmocktime", &setmocktime, true },
}; };
void RegisterMiscRPCCommands(CRPCTable &tableRPC) void RegisterMiscRPCCommands(CRPCTable &t)
{ {
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); t.appendCommand(commands[vcidx].name, &commands[vcidx]);
} }

4
src/rpc/net.cpp

@ -590,8 +590,8 @@ static const CRPCCommand commands[] =
{ "network", "clearbanned", &clearbanned, true }, { "network", "clearbanned", &clearbanned, true },
}; };
void RegisterNetRPCCommands(CRPCTable &tableRPC) void RegisterNetRPCCommands(CRPCTable &t)
{ {
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); t.appendCommand(commands[vcidx].name, &commands[vcidx]);
} }

4
src/rpc/rawtransaction.cpp

@ -910,8 +910,8 @@ static const CRPCCommand commands[] =
{ "blockchain", "verifytxoutproof", &verifytxoutproof, true }, { "blockchain", "verifytxoutproof", &verifytxoutproof, true },
}; };
void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC) void RegisterRawTransactionRPCCommands(CRPCTable &t)
{ {
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); t.appendCommand(commands[vcidx].name, &commands[vcidx]);
} }

12
src/rpc/register.h

@ -20,13 +20,13 @@ void RegisterMiningRPCCommands(CRPCTable &tableRPC);
/** Register raw transaction RPC commands */ /** Register raw transaction RPC commands */
void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC); void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC);
static inline void RegisterAllCoreRPCCommands(CRPCTable &tableRPC) static inline void RegisterAllCoreRPCCommands(CRPCTable &t)
{ {
RegisterBlockchainRPCCommands(tableRPC); RegisterBlockchainRPCCommands(t);
RegisterNetRPCCommands(tableRPC); RegisterNetRPCCommands(t);
RegisterMiscRPCCommands(tableRPC); RegisterMiscRPCCommands(t);
RegisterMiningRPCCommands(tableRPC); RegisterMiningRPCCommands(t);
RegisterRawTransactionRPCCommands(tableRPC); RegisterRawTransactionRPCCommands(t);
} }
#endif #endif

4
src/wallet/rpcwallet.cpp

@ -2617,8 +2617,8 @@ static const CRPCCommand commands[] =
{ "wallet", "removeprunedfunds", &removeprunedfunds, true }, { "wallet", "removeprunedfunds", &removeprunedfunds, true },
}; };
void RegisterWalletRPCCommands(CRPCTable &tableRPC) void RegisterWalletRPCCommands(CRPCTable &t)
{ {
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
tableRPC.appendCommand(commands[vcidx].name, &commands[vcidx]); t.appendCommand(commands[vcidx].name, &commands[vcidx]);
} }

2
src/wallet/rpcwallet.h

@ -7,6 +7,6 @@
class CRPCTable; class CRPCTable;
void RegisterWalletRPCCommands(CRPCTable &tableRPC); void RegisterWalletRPCCommands(CRPCTable &t);
#endif //BITCOIN_WALLET_RPCWALLET_H #endif //BITCOIN_WALLET_RPCWALLET_H

Loading…
Cancel
Save