rpc: fix EthLatestBlockNumber
value (#300)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
parent
c986ef59a3
commit
6aa43305ee
@ -88,7 +88,7 @@ func (e *EVMBackend) GetBlockByNumber(blockNum types.BlockNumber, fullTx bool) (
|
|||||||
switch blockNum {
|
switch blockNum {
|
||||||
case types.EthLatestBlockNumber:
|
case types.EthLatestBlockNumber:
|
||||||
if currentBlockNumber > 0 {
|
if currentBlockNumber > 0 {
|
||||||
height = int64(currentBlockNumber - 1)
|
height = int64(currentBlockNumber)
|
||||||
}
|
}
|
||||||
case types.EthPendingBlockNumber:
|
case types.EthPendingBlockNumber:
|
||||||
if currentBlockNumber > 0 {
|
if currentBlockNumber > 0 {
|
||||||
@ -241,7 +241,7 @@ func (e *EVMBackend) HeaderByNumber(blockNum types.BlockNumber) (*ethtypes.Heade
|
|||||||
switch blockNum {
|
switch blockNum {
|
||||||
case types.EthLatestBlockNumber:
|
case types.EthLatestBlockNumber:
|
||||||
if currentBlockNumber > 0 {
|
if currentBlockNumber > 0 {
|
||||||
height = int64(currentBlockNumber - 1)
|
height = int64(currentBlockNumber)
|
||||||
}
|
}
|
||||||
case types.EthPendingBlockNumber:
|
case types.EthPendingBlockNumber:
|
||||||
if currentBlockNumber > 0 {
|
if currentBlockNumber > 0 {
|
||||||
@ -363,7 +363,7 @@ func (e *EVMBackend) GetLogsByNumber(blockNum types.BlockNumber) ([][]*ethtypes.
|
|||||||
switch blockNum {
|
switch blockNum {
|
||||||
case types.EthLatestBlockNumber:
|
case types.EthLatestBlockNumber:
|
||||||
if currentBlockNumber > 0 {
|
if currentBlockNumber > 0 {
|
||||||
height = int64(currentBlockNumber - 1)
|
height = int64(currentBlockNumber)
|
||||||
}
|
}
|
||||||
case types.EthPendingBlockNumber:
|
case types.EthPendingBlockNumber:
|
||||||
if currentBlockNumber > 0 {
|
if currentBlockNumber > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user