Commit 164b3d2f authored by ids's avatar ids Committed by GitHub

Update conf_depth.go (#10487)

Don't apply the conf depth if l1Head is empty (as it is during the startup case before the l1State is initialized)
parent 03f6bd88
...@@ -31,7 +31,7 @@ func (c *confDepth) L1BlockRefByNumber(ctx context.Context, num uint64) (eth.L1B ...@@ -31,7 +31,7 @@ func (c *confDepth) L1BlockRefByNumber(ctx context.Context, num uint64) (eth.L1B
// TODO: performance optimization: buffer the l1Unsafe, invalidate any reorged previous buffer content, // TODO: performance optimization: buffer the l1Unsafe, invalidate any reorged previous buffer content,
// and instantly return the origin by number from the buffer if we can. // and instantly return the origin by number from the buffer if we can.
// Don't apply the conf depth is l1Head is empty (as it is during the startup case before the l1State is initialized). // Don't apply the conf depth if l1Head is empty (as it is during the startup case before the l1State is initialized).
l1Head := c.l1Head() l1Head := c.l1Head()
if l1Head == (eth.L1BlockRef{}) { if l1Head == (eth.L1BlockRef{}) {
return c.L1Fetcher.L1BlockRefByNumber(ctx, num) return c.L1Fetcher.L1BlockRefByNumber(ctx, num)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment