Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed Sep 25, 2024
2 parents 47a52bc + 6f0b367 commit ee28bf3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/bath/intentions.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func extractIntentions(trace *core.Trace) ([]OutMessage, int) {

func removeMatchedIntentions(trace *core.Trace, intentions *[]OutMessage) []OutMessage {
var matchAndRemove func(*core.Trace)
removed := 0
matchAndRemove = func(trace *core.Trace) {
if trace == nil {
return
Expand All @@ -71,7 +72,8 @@ func removeMatchedIntentions(trace *core.Trace, intentions *[]OutMessage) []OutM
for i, outMsg := range *intentions {
if isMatch(outMsg, child.Transaction.InMsg) {
// remove this outgoing message
*intentions = append((*intentions)[:i], (*intentions)[i+1:]...)
*intentions = append((*intentions)[:i-removed], (*intentions)[i+1-removed:]...)
removed++
}
}
matchAndRemove(child)
Expand Down

0 comments on commit ee28bf3

Please sign in to comment.