Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
This commit is contained in:
@@ -672,6 +672,9 @@ UniValue ProcessImport(const UniValue& data, const int64_t timestamp)
|
||||
|
||||
if (!isScript) {
|
||||
address = CBitcoinAddress(output);
|
||||
if (!address.IsValid()) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid address");
|
||||
}
|
||||
script = GetScriptForDestination(address.Get());
|
||||
} else {
|
||||
if (!IsHex(output)) {
|
||||
|
||||
Reference in New Issue
Block a user