mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Replace CScriptID and CKeyID in CTxDestination with dedicated types
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user