diff options
author | stickies-v <stickies-v@protonmail.com> | 2024-01-18 17:27:50 +0000 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2024-03-01 13:51:21 +0000 |
commit | 30a6c999351041d6a1e8712a9659be1296a1b46a (patch) | |
tree | fd475a5328acaba8f2177c36396222d60312a8a1 /src/rpc/signmessage.cpp | |
parent | bbb31269bfa449e82d3b6a20c2c3481fb3dcc316 (diff) |
rpc: access some args by name
Use the new key-based Arg helper in a few locations to show how
it is used.
Diffstat (limited to 'src/rpc/signmessage.cpp')
-rw-r--r-- | src/rpc/signmessage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/signmessage.cpp b/src/rpc/signmessage.cpp index 8c752ba1fd..9f3c24efcf 100644 --- a/src/rpc/signmessage.cpp +++ b/src/rpc/signmessage.cpp @@ -38,9 +38,9 @@ static RPCHelpMan verifymessage() }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { - std::string strAddress = request.params[0].get_str(); - std::string strSign = request.params[1].get_str(); - std::string strMessage = request.params[2].get_str(); + std::string strAddress = self.Arg<std::string>("address"); + std::string strSign = self.Arg<std::string>("signature"); + std::string strMessage = self.Arg<std::string>("message"); switch (MessageVerify(strAddress, strSign, strMessage)) { case MessageVerificationResult::ERR_INVALID_ADDRESS: |