diff --git a/eth/api_backend.go b/eth/api_backend.go index 7cd6676036..b39dd4cbdb 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -155,8 +155,7 @@ func (b *EthAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumbe bn = b.HistoryPruningCutoff() } block := b.eth.blockchain.GetBlockByNumber(bn) - historyCutoff, _ := b.eth.blockchain.HistoryPruningCutoff() - if block == nil && bn < historyCutoff { + if block == nil && bn < b.HistoryPruningCutoff() { return nil, ðconfig.PrunedHistoryError{} } return block, nil