diff options
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r-- | src/script/sign.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 59af4e4905..4b01a6de94 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -126,7 +126,7 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP static CScript PushAll(const std::vector<valtype>& values) { CScript result; - BOOST_FOREACH(const valtype& v, values) { + for (const valtype& v : values) { if (v.size() == 0) { result << OP_0; } else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) { @@ -141,10 +141,9 @@ static CScript PushAll(const std::vector<valtype>& values) bool ProduceSignature(const BaseSignatureCreator& creator, const CScript& fromPubKey, SignatureData& sigdata) { CScript script = fromPubKey; - bool solved = true; std::vector<valtype> result; txnouttype whichType; - solved = SignStep(creator, script, result, whichType, SIGVERSION_BASE); + bool solved = SignStep(creator, script, result, whichType, SIGVERSION_BASE); bool P2SH = false; CScript subscript; sigdata.scriptWitness.stack.clear(); @@ -232,12 +231,12 @@ static std::vector<valtype> CombineMultisig(const CScript& scriptPubKey, const B { // Combine all the signatures we've got: std::set<valtype> allsigs; - BOOST_FOREACH(const valtype& v, sigs1) + for (const valtype& v : sigs1) { if (!v.empty()) allsigs.insert(v); } - BOOST_FOREACH(const valtype& v, sigs2) + for (const valtype& v : sigs2) { if (!v.empty()) allsigs.insert(v); @@ -248,7 +247,7 @@ static std::vector<valtype> CombineMultisig(const CScript& scriptPubKey, const B unsigned int nSigsRequired = vSolutions.front()[0]; unsigned int nPubKeys = vSolutions.size()-2; std::map<valtype, valtype> sigs; - BOOST_FOREACH(const valtype& sig, allsigs) + for (const valtype& sig : allsigs) { for (unsigned int i = 0; i < nPubKeys; i++) { |