Skip to content

Commit

Permalink
Fix err handling in Log Poller MatchingFiltersForEncodedEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
ilija42 committed Jan 17, 2025
1 parent 97a6601 commit 324aa33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/solana/logpoller/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ func (fl *filters) MatchingFiltersForEncodedEvent(event ProgramEvent) iter.Seq[F
}

discriminator, err := base64.StdEncoding.DecodeString(event.Data[:12])
if err != nil {
fl.lggr.Errorw("failed to decode event discriminator", "event", event, "err", err)
return nil
}

discriminator = discriminator[:8]

isKnown := func() (ok bool) {
Expand Down

0 comments on commit 324aa33

Please sign in to comment.