Skip to content

Commit e784390

Browse files
committed
Style.
1 parent a4f8301 commit e784390

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,11 +1721,18 @@ code interpreter<Stack>::connect_witness(const context& state,
17211721
// A defined version indicates bip141 is active.
17221722
interpreter program(tx, it, script, state.flags, version, stack);
17231723
if ((ec = program.run()))
1724+
{
17241725
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;
1726+
}
1727+
else if (!program.is_true(true))
1728+
{
1729+
// A v0 script must succeed with a clean true stack (bip141).
1730+
return error::stack_false;
1731+
}
1732+
else
1733+
{
1734+
return error::script_success;
1735+
}
17291736
}
17301737

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

0 commit comments

Comments
 (0)