Skip to content

Commit

Permalink
Update api_backend.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored Mar 13, 2023
1 parent 8cbf6ef commit 4c8e217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumb
return b.eth.blockchain.CurrentBlock(), nil
}
if !b.eth.Merger().TDDReached() && (number == rpc.FinalizedBlockNumber || number == rpc.SafeBlockNumber) {
return nil, errors.New("tag not supported on pre-merge network")
return nil, errors.New("finalized/safe is not supported on pre-merge network")
}
if number == rpc.FinalizedBlockNumber {
block := b.eth.blockchain.CurrentFinalBlock()
Expand Down Expand Up @@ -127,7 +127,7 @@ func (b *EthAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumbe
return b.eth.blockchain.GetBlock(header.Hash(), header.Number.Uint64()), nil
}
if !b.eth.Merger().TDDReached() && (number == rpc.FinalizedBlockNumber || number == rpc.SafeBlockNumber) {
return nil, errors.New("tag not supported on pre-merge network")
return nil, errors.New("finalized/safe is not supported on pre-merge network")
}
if number == rpc.FinalizedBlockNumber {
header := b.eth.blockchain.CurrentFinalBlock()
Expand Down

0 comments on commit 4c8e217

Please sign in to comment.