Skip to content

Commit

Permalink
core: fix too many nesting levels bug
Browse files Browse the repository at this point in the history
The C# implementation only decrements the nesting depth once
in the parent composite condition (And, Or, or Not) and then
passes that already‐decremented value onto its subconditions
 without further decrementing inside the loop.

Close #3809

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Feb 13, 2025
1 parent 62972eb commit a0677f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/core/transaction/witness_condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func readArrayOfConditions(r *io.BinReader, maxDepth int) []WitnessCondition {
}
a := make([]WitnessCondition, l)
for i := range a {
a[i] = decodeBinaryCondition(r, maxDepth-1)
a[i] = decodeBinaryCondition(r, maxDepth)
}
if r.Err != nil {
return nil
Expand Down

0 comments on commit a0677f8

Please sign in to comment.