Skip to content

Commit

Permalink
fix(relayer): include all applicable msgs in cursor store
Browse files Browse the repository at this point in the history
  • Loading branch information
corverroos committed Nov 27, 2024
1 parent cb1b529 commit c7a193c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions relayer/app/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ func (w *Worker) newCallback(
}
}

submitted := make(map[xchain.StreamID][]xchain.Msg)
// Add all conf-level applicable messages to cursor store
applicable := make(map[xchain.StreamID][]xchain.Msg)

// Split into streams
for streamID, msgs := range msgStreamMapper(block.Msgs) {
Expand All @@ -282,6 +283,8 @@ func (w *Worker) newCallback(
continue // Skip streams not applicable to this attestation conf level.
}

applicable[streamID] = msgs

if err := w.awaitValSet(ctx, att.ValidatorSetID); err != nil {
return errors.Wrap(err, "await validator set")
}
Expand Down Expand Up @@ -312,11 +315,9 @@ func (w *Worker) newCallback(
return err
}
}

submitted[streamID] = msgs
}

return saveCursors(submitted)
return saveCursors(applicable)
}
}

Expand Down

0 comments on commit c7a193c

Please sign in to comment.