git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
1240a1b
)
Fixed addmultisigaddress if looking up public keys from locked wallets.
author
Gavin Andresen
<gavinandresen@gmail.com>
Mon, 23 Jan 2012 17:04:34 +0000 (12:04 -0500)
committer
Gavin Andresen
<gavinandresen@gmail.com>
Mon, 23 Jan 2012 17:04:34 +0000 (12:04 -0500)
src/bitcoinrpc.cpp
patch
|
blob
|
history
diff --git
a/src/bitcoinrpc.cpp
b/src/bitcoinrpc.cpp
index
5ac58de
..
3063abd
100644
(file)
--- a/
src/bitcoinrpc.cpp
+++ b/
src/bitcoinrpc.cpp
@@
-1025,9
+1025,12
@@
Value addmultisigaddress(const Array& params, bool fHelp)
if (address.IsScript())
throw runtime_error(
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(
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