mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
eth_blockNumber should be equal to latest in eth_getBlockByNumber (#4421)
This commit is contained in:
parent
f830401258
commit
36eacd23c0
@ -22,14 +22,14 @@ func (api *APIImpl) BlockNumber(ctx context.Context) (hexutil.Uint64, error) {
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
defer tx.Rollback()
|
defer tx.Rollback()
|
||||||
execution, err := stages.GetStageProgress(tx, stages.Finish)
|
blockNum, err := getLatestBlockNumber(tx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
return hexutil.Uint64(execution), nil
|
return hexutil.Uint64(blockNum), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Syncing implements eth_syncing. Returns a data object detaling the status of the sync process or false if not syncing.
|
// Syncing implements eth_syncing. Returns a data object detailing the status of the sync process or false if not syncing.
|
||||||
func (api *APIImpl) Syncing(ctx context.Context) (interface{}, error) {
|
func (api *APIImpl) Syncing(ctx context.Context) (interface{}, error) {
|
||||||
tx, err := api.db.BeginRo(ctx)
|
tx, err := api.db.BeginRo(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user