X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Frpcrawtransaction.cpp;h=b8365c633d525493dfdefc763bd883f408aab5ab;hp=c2a10f3056fd38b2a699f003594e7f622665274a;hb=9e58e0a8ca28b15a4bfa677f5b23891972db40fd;hpb=62b3df9c02e86432aa73f8b475900946bb348816 diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index c2a10f3..b8365c6 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -652,7 +652,7 @@ Value createmultisig(const Array& params, bool fHelp) "(got %" PRIszu " keys, but need at least %d to redeem)", keys.size(), nRequired)); if (keys.size() > 16) throw runtime_error("Number of addresses involved in the multisignature address creation > 16\nReduce the number"); - std::vector pubkeys; + std::vector pubkeys; pubkeys.resize(keys.size()); for (unsigned int i = 0; i < keys.size(); i++) { @@ -670,16 +670,18 @@ Value createmultisig(const Array& params, bool fHelp) if (!pwalletMain->GetPubKey(keyID, vchPubKey)) throw runtime_error( strprintf("no full public key for address %s",ks.c_str())); - if (!vchPubKey.IsValid() || !pubkeys[i].SetPubKey(vchPubKey)) + if (!vchPubKey.IsFullyValid()) throw runtime_error(" Invalid public key: "+ks); + pubkeys[i] = vchPubKey; } // Case 2: hex public key else if (IsHex(ks)) { CPubKey vchPubKey(ParseHex(ks)); - if (!vchPubKey.IsValid() || !pubkeys[i].SetPubKey(vchPubKey)) + if (!vchPubKey.IsFullyValid()) throw runtime_error(" Invalid public key: "+ks); + pubkeys[i] = vchPubKey; } else {