mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
signrawtransaction: validate private key.
This commit is contained in:
@ -587,6 +587,8 @@ Value signrawtransaction(const Array& params, bool fHelp)
|
||||
if (!fGood)
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
|
||||
CKey key = vchSecret.GetKey();
|
||||
if (!key.IsValid())
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key outside allowed range");
|
||||
tempKeystore.AddKey(key);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user