The SyncStatus() function on chain_container.go can return an empty SyncStatus{} result, both directly in line 335 and via the call to c.vn.SyncStatus() in line 337:
|
func (c *simpleChainContainer) SyncStatus(ctx context.Context) (*eth.SyncStatus, error) { |
|
if c.vn == nil { |
|
if c.log != nil { |
|
c.log.Warn("SyncStatus: virtual node not initialized") |
|
} |
|
return ð.SyncStatus{}, nil |
|
} |
|
st, err := c.vn.SyncStatus(ctx) |
|
if err != nil { |
|
return nil, err |
|
} |
|
return st, nil |
|
} |
The function is called in a few places in the codebase, but they don't seem to check for the case when the return value is empty. This could cause the exceptional empty value to be processed like a valid status result.
Status
Fixed in PR #19543.
The
SyncStatus()function onchain_container.gocan return an emptySyncStatus{}result, both directly in line 335 and via the call toc.vn.SyncStatus()in line 337:_audits_Ethereum-optimism_optimism_interopv2/op-supernode/supernode/chain_container/chain_container.go
Lines 330 to 342 in be00aaa
The function is called in a few places in the codebase, but they don't seem to check for the case when the return value is empty. This could cause the exceptional empty value to be processed like a valid status result.
Status
Fixed in PR #19543.