Skip to content

Commit

Permalink
fix(events): don't log.Warn for EVM events with non-Raw codec
Browse files Browse the repository at this point in the history
Codec != Raw likely means built-in actor events, which we can safely skip, so
avoid filling up logs with warnings for every built-in actor event that comes
past this point.

Fixes: #11718
  • Loading branch information
rvagg committed Mar 19, 2024
1 parent 73947ea commit 27cdafb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/impl/full/eth_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ func ethLogFromEvent(entries []types.EventEntry) (data []byte, topics []ethtypes
// Topics must be non-nil, even if empty. So we might as well pre-allocate for 4 (the max).
topics = make([]ethtypes.EthHash, 0, 4)
for _, entry := range entries {
// Drop events with non-raw topics to avoid mistakes.
// Drop events with non-raw topics. Built-in actors emit CBOR, and anything else would be
// invalid anyway.
if entry.Codec != cid.Raw {
log.Warnw("did not expect an event entry with a non-raw codec", "codec", entry.Codec, "key", entry.Key)
return nil, nil, false
}
// Check if the key is t1..t4
Expand Down

0 comments on commit 27cdafb

Please sign in to comment.