laconicd/rpc
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
..
ethereum eth_feeHistory - fix reward calculation from MsgEthereumTx (#990) 2022-03-15 08:11:31 +01:00
apis.go rpc: restructure JSON-RPC directory and rename server config (#612) 2021-10-01 14:49:22 +00:00
doc.go rpc: restructure JSON-RPC directory and rename server config (#612) 2021-10-01 14:49:22 +00:00
websockets.go fix: websocket client duplicated messages (#955) 2022-02-25 19:08:30 +00:00