laconicd-deprecated/rpc/ethereum/backend
Loredana Cirstea d04787e97f
eth_feeHistory - fix reward calculation from MsgEthereumTx (#990)
* eth_feeHistory - fix reward calculation from MsgEthereumTx

Problem:
- rewards calculation based on percentiles took into consideration the tendermint tx count instead of `MsgEthereumTx` count.
- `sorter := make(sortGasAndReward, tendermintTxCount)` creates an array of `{0 <nil>}` values.
The `nil` value from the `reward` attribute was never rewritten for tendermint Tx without any `MsgEthereumTx`

Fixes:
- return early if there are 0 `MsgEthereumTx`
- use the `MsgEthereumTx` count to calculate rewards

* Add change log
2022-03-15 08:11:31 +01:00
..
backend.go fix: Metamask keeps failing sending transactions (#968) 2022-03-03 20:50:40 +00:00
feebackend.go eth_feeHistory - fix reward calculation from MsgEthereumTx (#990) 2022-03-15 08:11:31 +01:00
utils.go fix: Metamask keeps failing sending transactions (#968) 2022-03-03 20:50:40 +00:00