Skip to content

Commit

Permalink
Merge pull request #1592 from evoskuil/master
Browse files Browse the repository at this point in the history
Style, remove bad include.
  • Loading branch information
evoskuil authored Jan 25, 2025
2 parents a4f8301 + 4073197 commit d6c2643
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions include/bitcoin/system/impl/machine/interpreter.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#ifndef LIBBITCOIN_SYSTEM_MACHINE_INTERPRETER_IPP
#define LIBBITCOIN_SYSTEM_MACHINE_INTERPRETER_IPP

#include "bitcoin/system/chain/prevout.hpp"
#include <utility>
#include <bitcoin/system/chain/chain.hpp>
#include <bitcoin/system/chain/operation.hpp>
Expand Down Expand Up @@ -1721,11 +1720,18 @@ code interpreter<Stack>::connect_witness(const context& state,
// A defined version indicates bip141 is active.
interpreter program(tx, it, script, state.flags, version, stack);
if ((ec = program.run()))
{
return ec;

// A v0 script must succeed with a clean true stack (bip141).
return program.is_true(true) ? error::script_success :
error::stack_false;
}
else if (!program.is_true(true))
{
// A v0 script must succeed with a clean true stack (bip141).
return error::stack_false;
}
else
{
return error::script_success;
}
}

// These versions are reserved for future extensions (bip141).
Expand Down

0 comments on commit d6c2643

Please sign in to comment.