mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
signrawtransaction: validate private key.
Github-Pull: #5461
Rebased-From: aa768f1848
This commit is contained in:
parent
0133e4fb48
commit
44b4c0d8a9
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue