aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGregory Maxwell <gmaxwell@gmail.com>2012-05-05 12:34:46 -0700
committerGregory Maxwell <gmaxwell@gmail.com>2012-05-05 12:34:46 -0700
commit5b8def797cb88c95a3d2a1c0a5a97a3c6e6ef3c4 (patch)
tree9251990c4bd23892153f15369d4120cdcf733c7d /src
parent82e6b92b0ac75ed15014e5b1723299fa838ce82e (diff)
parent86c47a563611ac14461dca3774bf1e5fe9eca546 (diff)
downloadbitcoin-5b8def797cb88c95a3d2a1c0a5a97a3c6e6ef3c4.tar.xz
Merge pull request #1160 from retep/master
Minor error message fix
Diffstat (limited to 'src')
-rw-r--r--src/bitcoinrpc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index 15bcf1da3d..0b851c4e70 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -999,10 +999,12 @@ Value addmultisigaddress(const Array& params, bool fHelp)
strAccount = AccountFromValue(params[2]);
// Gather public keys
- if ((nRequired < 1) || ((int)keys.size() < nRequired))
+ if (nRequired < 1)
+ throw runtime_error("a multisignature address must require at least one key to redeem");
+ if ((int)keys.size() < nRequired)
throw runtime_error(
- strprintf("wrong number of keys"
- "(got %d, need at least %d)", keys.size(), nRequired));
+ strprintf("not enough keys supplied "
+ "(got %d keys, but need at least %d to redeem)", keys.size(), nRequired));
std::vector<CKey> pubkeys;
pubkeys.resize(keys.size());
for (unsigned int i = 0; i < keys.size(); i++)