From c3a5d5e6b38e688ddca58a613000b6b681ece1ae Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Tue, 10 Dec 2024 16:36:32 -0500 Subject: [PATCH] Last quick verification --- x/evm/tracers/firehose.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x/evm/tracers/firehose.go b/x/evm/tracers/firehose.go index 4cc72206d..466bf3591 100644 --- a/x/evm/tracers/firehose.go +++ b/x/evm/tracers/firehose.go @@ -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" ) @@ -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)