diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index c5809d250..9b6794339 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -1802,12 +1802,16 @@ func newEthBlockFromFilecoinTipSet(ctx context.Context, ts *types.TipSet, fullTx return ethtypes.EthBlock{}, xerrors.Errorf("failed to compute state: %w", err) } - for txIdx, msg := range compOutput.Trace { + txIdx := 0 + for _, msg := range compOutput.Trace { // skip system messages like reward application and cron if msg.Msg.From == builtintypes.SystemActorAddr { continue } + ti := ethtypes.EthUint64(txIdx) + txIdx++ + gasUsed += msg.MsgRct.GasUsed smsgCid, err := getSignedMessage(ctx, cs, msg.MsgCid) if err != nil { @@ -1818,8 +1822,6 @@ func newEthBlockFromFilecoinTipSet(ctx context.Context, ts *types.TipSet, fullTx return ethtypes.EthBlock{}, xerrors.Errorf("failed to convert msg to ethTx: %w", err) } - ti := ethtypes.EthUint64(txIdx) - tx.ChainID = ethtypes.EthUint64(build.Eip155ChainId) tx.BlockHash = &blkHash tx.BlockNumber = &bn