@@ -172,9 +172,6 @@ export class HistoryNetwork extends BaseNetwork {
172
172
const proof = headerProof . proof
173
173
174
174
if ( header . number < MERGE_BLOCK ) {
175
- if ( proof === null ) {
176
- throw new Error ( 'Received pre-merge block header without proof' )
177
- }
178
175
let deserializedProof : Uint8Array [ ]
179
176
try {
180
177
deserializedProof = AccumulatorProofType . deserialize ( proof )
@@ -200,10 +197,6 @@ export class HistoryNetwork extends BaseNetwork {
200
197
throw new Error ( 'Unable to validate proof for pre-merge header' )
201
198
}
202
199
} else if ( header . number < SHANGHAI_BLOCK ) {
203
- if ( proof === null ) {
204
- this . logger ( 'Received post-merge block without proof' )
205
- throw new Error ( 'Received post-merge block header without proof' )
206
- }
207
200
let deserializedProof : ReturnType < typeof HistoricalRootsBlockProof . deserialize >
208
201
try {
209
202
deserializedProof = HistoricalRootsBlockProof . deserialize ( proof )
@@ -222,9 +215,7 @@ export class HistoryNetwork extends BaseNetwork {
222
215
}
223
216
} else {
224
217
// TODO: Check proof slot to ensure header is from previous sync period and handle ephemeral headers separately
225
- if ( proof === null ) {
226
- this . logger ( 'Received post-merge block without proof' )
227
- }
218
+
228
219
let deserializedProof : ReturnType < typeof HistoricalSummariesBlockProof . deserialize >
229
220
try {
230
221
deserializedProof = HistoricalSummariesBlockProof . deserialize ( proof )
@@ -386,7 +377,8 @@ export class HistoryNetwork extends BaseNetwork {
386
377
this . gossipManager . add ( contentKey )
387
378
}
388
379
this . logger (
389
- `${ HistoryNetworkContentType [ contentType ] } added for ${ keyOpt instanceof Uint8Array ? bytesToHex ( keyOpt ) : keyOpt
380
+ `${ HistoryNetworkContentType [ contentType ] } added for ${
381
+ keyOpt instanceof Uint8Array ? bytesToHex ( keyOpt ) : keyOpt
390
382
} `,
391
383
)
392
384
}
0 commit comments