eth_getBlockByNumber fix on batch transactions (#1050)

This commit is contained in:
crypto-facs
2022-04-18 19:06:04 +02:00
committed by GitHub
parent bc4b018b60
commit 7e359068d8
3 changed files with 101 additions and 3 deletions
+3 -1
View File
@@ -362,6 +362,7 @@ func (e *EVMBackend) EthBlockFromTendermint(
}
txResults := resBlockResult.TxsResults
txIndex := uint64(0)
for i, txBz := range block.Txs {
tx, err := e.clientCtx.TxConfig.TxDecoder()(txBz)
@@ -394,7 +395,7 @@ func (e *EVMBackend) EthBlockFromTendermint(
tx,
common.BytesToHash(block.Hash()),
uint64(block.Height),
uint64(i),
txIndex,
baseFee,
)
if err != nil {
@@ -402,6 +403,7 @@ func (e *EVMBackend) EthBlockFromTendermint(
continue
}
ethRPCTxs = append(ethRPCTxs, rpcTx)
txIndex++
}
}