Skip to content

Commit

Permalink
Use empty() instead of size() == 0
Browse files Browse the repository at this point in the history
Signed-off-by: Azat Nizametdinov <azat@thirdhash.com>
  • Loading branch information
Nizametdinov committed Feb 22, 2019
1 parent 4e522ab commit 81d2cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/script/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, const WitnessPro
scriptPubKey << OP_DUP << OP_HASH160 << witnessProgram.program[0] << OP_EQUALVERIFY << OP_CHECKSIG;
stack = witness.stack;
} else {
if (witness.stack.size() == 0) {
if (witness.stack.empty()) {
return set_error(serror, SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY);
}
scriptPubKey = CScript(witness.stack.back().begin(), witness.stack.back().end());
Expand Down

0 comments on commit 81d2cd1

Please sign in to comment.