forked from cerc-io/laconicd-deprecated
eth_getBlockByNumber fix on batch transactions (#1050)
This commit is contained in:
@@ -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++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user