Skip to content

Commit

Permalink
more robust fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsamuels453 committed Jan 9, 2024
1 parent a8581de commit 62e58c4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkg/health/ethereum/execution_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ func (c *ExecRpcClient) GetLatestBlockBy(ctx context.Context, blockType string)
"Unknown block error", //nethermind
"unknown block", //reth
}
if err.Error() == notFinalizingErrors[0] ||
err.Error() == notFinalizingErrors[1] ||
err.Error() == notFinalizingErrors[2] ||
err.Error() == notFinalizingErrors[3] ||
err.Error() == notFinalizingErrors[4] {
noFinalBlockFound := false
for _, msg := range notFinalizingErrors {
if err.Error() == msg {
noFinalBlockFound = true
break
}
}

if noFinalBlockFound {
choice = &ClientForkChoice{
Pod: c.session.Pod,
BlockNumber: 0,
Expand Down

0 comments on commit 62e58c4

Please sign in to comment.