mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 07:17:53 +00:00
Fixed addmultisigaddress if looking up public keys from locked wallets.
This commit is contained in:
parent
1240a1b0a8
commit
dc77dce07c
@ -1025,9 +1025,12 @@ Value addmultisigaddress(const Array& params, bool fHelp)
|
|||||||
if (address.IsScript())
|
if (address.IsScript())
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
strprintf("%s is a pay-to-script address",ks.c_str()));
|
strprintf("%s is a pay-to-script address",ks.c_str()));
|
||||||
if (!pwalletMain->GetKey(address, pubkeys[i]))
|
std::vector<unsigned char> vchPubKey;
|
||||||
|
if (!pwalletMain->GetPubKey(address, vchPubKey))
|
||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
strprintf("no full public key for address %s",ks.c_str()));
|
strprintf("no full public key for address %s",ks.c_str()));
|
||||||
|
if (vchPubKey.empty() || !pubkeys[i].SetPubKey(vchPubKey))
|
||||||
|
throw runtime_error(" Invalid public key: "+ks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Case 2: hex public key
|
// Case 2: hex public key
|
||||||
|
Loading…
Reference in New Issue
Block a user