mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Replace CScriptID and CKeyID in CTxDestination with dedicated types
This commit is contained in:
parent
caceff5546
commit
70946e7fee
31 changed files with 185 additions and 161 deletions
|
|
@ -307,8 +307,8 @@ static UniValue verifymessage(const JSONRPCRequest& request)
|
|||
throw JSONRPCError(RPC_TYPE_ERROR, "Invalid address");
|
||||
}
|
||||
|
||||
const CKeyID *keyID = boost::get<CKeyID>(&destination);
|
||||
if (!keyID) {
|
||||
const PKHash *pkhash = boost::get<PKHash>(&destination);
|
||||
if (!pkhash) {
|
||||
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key");
|
||||
}
|
||||
|
||||
|
|
@ -326,7 +326,7 @@ static UniValue verifymessage(const JSONRPCRequest& request)
|
|||
if (!pubkey.RecoverCompact(ss.GetHash(), vchSig))
|
||||
return false;
|
||||
|
||||
return (pubkey.GetID() == *keyID);
|
||||
return (pubkey.GetID() == *pkhash);
|
||||
}
|
||||
|
||||
static UniValue signmessagewithprivkey(const JSONRPCRequest& request)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue