diff options
| author | Gregory Maxwell <[email protected]> | 2012-05-05 12:34:46 -0700 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2012-05-05 12:34:46 -0700 |
| commit | 5b8def797cb88c95a3d2a1c0a5a97a3c6e6ef3c4 (patch) | |
| tree | 9251990c4bd23892153f15369d4120cdcf733c7d /src/bitcoinrpc.cpp | |
| parent | Bugfix: %-12I64d is not valid and causes the parameter to be skipped, use %12... (diff) | |
| parent | Fixed non-sensical error message (diff) | |
| download | discoin-5b8def797cb88c95a3d2a1c0a5a97a3c6e6ef3c4.tar.xz discoin-5b8def797cb88c95a3d2a1c0a5a97a3c6e6ef3c4.zip | |
Merge pull request #1160 from retep/master
Minor error message fix
Diffstat (limited to 'src/bitcoinrpc.cpp')
| -rw-r--r-- | src/bitcoinrpc.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 15bcf1da3..0b851c4e7 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++) |