mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
rpc: Avoid copies in JSONRPCReplyObj()
Change parameters from const references to values, so they can be moved into the reply instead of copied. Also update callers to move instead of copy.
This commit is contained in:
committed by
Ryan Ofsky
parent
09416f9ec4
commit
df6e3756d6
@@ -12,8 +12,7 @@
|
||||
#include <univalue.h>
|
||||
|
||||
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);
|
||||
UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id);
|
||||
std::string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id);
|
||||
UniValue JSONRPCReplyObj(UniValue result, UniValue error, UniValue id);
|
||||
UniValue JSONRPCError(int code, const std::string& message);
|
||||
|
||||
/** Generate a new RPC authentication cookie and write it to disk */
|
||||
|
||||
Reference in New Issue
Block a user