mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
eth: fixup
This commit is contained in:
parent
0ce8fe3fd4
commit
fbc32aa9b1
1 changed files with 1 additions and 2 deletions
|
|
@ -155,8 +155,7 @@ func (b *EthAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumbe
|
||||||
bn = b.HistoryPruningCutoff()
|
bn = b.HistoryPruningCutoff()
|
||||||
}
|
}
|
||||||
block := b.eth.blockchain.GetBlockByNumber(bn)
|
block := b.eth.blockchain.GetBlockByNumber(bn)
|
||||||
historyCutoff, _ := b.eth.blockchain.HistoryPruningCutoff()
|
if block == nil && bn < b.HistoryPruningCutoff() {
|
||||||
if block == nil && bn < historyCutoff {
|
|
||||||
return nil, ðconfig.PrunedHistoryError{}
|
return nil, ðconfig.PrunedHistoryError{}
|
||||||
}
|
}
|
||||||
return block, nil
|
return block, nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue