Skip to content

Commit

Permalink
Last quick verification
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Dec 10, 2024
1 parent adef7fb commit c3a5d5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x/evm/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
evmtypes "github.com/sei-protocol/sei-chain/x/evm/types"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
)
Expand Down Expand Up @@ -451,9 +452,18 @@ func getActivePrecompilesChecker(rules params.Rules) func(addr common.Address) b
}

func (f *Firehose) OnBlockEnd(err error) {
if f.block.Number >= 119822071 {
panic("Block number is too high for now")
}

blockNumber := f.block.Number
firehoseInfo("block ending (number=%d, trx=%d, err=%s)", blockNumber, len(f.block.TransactionTraces), errorView(err))

marshalled, marshalErr := protojson.MarshalOptions{}.Marshal(f.block)
if marshalErr == nil {
fmt.Fprintf(os.Stderr, "[Firehose] %s", string(marshalled))
}

if err == nil {
f.ensureInBlockAndNotInTrx()
f.printBlockToFirehose(f.block, f.blockFinality)
Expand Down

0 comments on commit c3a5d5e

Please sign in to comment.