@@ -78,24 +78,18 @@ func (b *EthAPIBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumb
78
78
return b .eth .blockchain .CurrentBlock (), nil
79
79
}
80
80
if number == rpc .FinalizedBlockNumber {
81
- if ! b .eth .Merger ().TDDReached () {
82
- return nil , errors .New ("'finalized' tag not supported on pre-merge network" )
83
- }
84
81
block := b .eth .blockchain .CurrentFinalBlock ()
85
- if block ! = nil {
86
- return block , nil
82
+ if block = = nil {
83
+ return nil , errors . New ( "finalized block not found" )
87
84
}
88
- return nil , errors . New ( "finalized block not found" )
85
+ return block , nil
89
86
}
90
87
if number == rpc .SafeBlockNumber {
91
- if ! b .eth .Merger ().TDDReached () {
92
- return nil , errors .New ("'safe' tag not supported on pre-merge network" )
93
- }
94
88
block := b .eth .blockchain .CurrentSafeBlock ()
95
- if block ! = nil {
96
- return block , nil
89
+ if block = = nil {
90
+ return nil , errors . New ( "safe block not found" )
97
91
}
98
- return nil , errors . New ( "safe block not found" )
92
+ return block , nil
99
93
}
100
94
return b .eth .blockchain .GetHeaderByNumber (uint64 (number )), nil
101
95
}
@@ -136,19 +130,13 @@ func (b *EthAPIBackend) BlockByNumber(ctx context.Context, number rpc.BlockNumbe
136
130
return b .eth .blockchain .GetBlock (header .Hash (), header .Number .Uint64 ()), nil
137
131
}
138
132
if number == rpc .FinalizedBlockNumber {
139
- if ! b .eth .Merger ().TDDReached () {
140
- return nil , errors .New ("'finalized' tag not supported on pre-merge network" )
141
- }
142
133
header := b .eth .blockchain .CurrentFinalBlock ()
143
134
if header == nil {
144
135
return nil , errors .New ("finalized block not found" )
145
136
}
146
137
return b .eth .blockchain .GetBlock (header .Hash (), header .Number .Uint64 ()), nil
147
138
}
148
139
if number == rpc .SafeBlockNumber {
149
- if ! b .eth .Merger ().TDDReached () {
150
- return nil , errors .New ("'safe' tag not supported on pre-merge network" )
151
- }
152
140
header := b .eth .blockchain .CurrentSafeBlock ()
153
141
if header == nil {
154
142
return nil , errors .New ("safe block not found" )
0 commit comments