Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed May 28, 2024
1 parent 51d22a2 commit 51f265a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rpc/backend/blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ func (b *Backend) BlockNumberFromTendermintByHash(blockHash common.Hash) (*big.I
return big.NewInt(resBlock.Block.Height), nil
}

// EthMsgsFromTendermintBlock returns all real MsgEthereumTxs from a
// EthMsgsFromTendermintBlock returns all real and synthetic MsgEthereumTxs from a
// Tendermint block. It also ensures consistency over the correct txs indexes
// across RPC endpoints
// TODO: check if additionals array can be removed
Expand All @@ -300,7 +300,7 @@ func (b *Backend) EthMsgsFromTendermintBlock(
if err != nil {
b.logger.Debug("failed to decode transaction in block", "height", block.Height, "error", err.Error())
// try to check if there is synthetic eth tx in tx result
ethMsg, additional := b.parseSyntheticTx(txResults, i, tx, block)
ethMsg, additional := b.parseSyntheticTxFromBlockResults(txResults, i, tx, block)
if ethMsg == nil {
continue
}
Expand All @@ -324,7 +324,7 @@ func (b *Backend) EthMsgsFromTendermintBlock(

if shouldCheckForSyntheticTx {
// try to check if there is synthetic eth tx in tx result
ethMsg, additional := b.parseSyntheticTx(txResults, i, tx, block)
ethMsg, additional := b.parseSyntheticTxFromBlockResults(txResults, i, tx, block)
if ethMsg == nil {
continue
}
Expand All @@ -335,7 +335,7 @@ func (b *Backend) EthMsgsFromTendermintBlock(
return result, txsAdditional
}

func (b *Backend) parseSyntheticTx(
func (b *Backend) parseSyntheticTxFromBlockResults(
txResults []*abci.ResponseDeliverTx,
i int,
tx sdk.Tx,
Expand Down

0 comments on commit 51f265a

Please sign in to comment.