Skip to content

Commit

Permalink
use app latest block height instead of status
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Oct 28, 2024
1 parent a2bc6ca commit 44ca7f5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions jsonrpc/backend/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import (
)

func (b *JSONRPCBackend) BlockNumber() (hexutil.Uint64, error) {
res, err := b.clientCtx.Client.Status(b.ctx)
if err != nil {
return 0, err
}

return hexutil.Uint64(res.SyncInfo.LatestBlockHeight), nil
return hexutil.Uint64(b.app.LastBlockHeight()), nil
}

func (b *JSONRPCBackend) resolveBlockNrOrHash(blockNrOrHash rpc.BlockNumberOrHash) (uint64, error) {
Expand Down

0 comments on commit 44ca7f5

Please sign in to comment.