Skip to content

Commit d6c2643

Browse files
authored
Merge pull request #1592 from evoskuil/master
Style, remove bad include.
2 parents a4f8301 + 4073197 commit d6c2643

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

include/bitcoin/system/impl/machine/interpreter.ipp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#ifndef LIBBITCOIN_SYSTEM_MACHINE_INTERPRETER_IPP
2020
#define LIBBITCOIN_SYSTEM_MACHINE_INTERPRETER_IPP
2121

22-
#include "bitcoin/system/chain/prevout.hpp"
2322
#include <utility>
2423
#include <bitcoin/system/chain/chain.hpp>
2524
#include <bitcoin/system/chain/operation.hpp>
@@ -1721,11 +1720,18 @@ code interpreter<Stack>::connect_witness(const context& state,
17211720
// A defined version indicates bip141 is active.
17221721
interpreter program(tx, it, script, state.flags, version, stack);
17231722
if ((ec = program.run()))
1723+
{
17241724
return ec;
1725-
1726-
// A v0 script must succeed with a clean true stack (bip141).
1727-
return program.is_true(true) ? error::script_success :
1728-
error::stack_false;
1725+
}
1726+
else if (!program.is_true(true))
1727+
{
1728+
// A v0 script must succeed with a clean true stack (bip141).
1729+
return error::stack_false;
1730+
}
1731+
else
1732+
{
1733+
return error::script_success;
1734+
}
17291735
}
17301736

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

0 commit comments

Comments
 (0)