Skip to content

Commit

Permalink
fix(taiko-client): avoid seting nil value to `GuardianProverHeartbeat…
Browse files Browse the repository at this point in the history
…er` (#17802)
  • Loading branch information
mask-pp authored Jul 16, 2024
1 parent e8c1b18 commit 4076324
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/taiko-client/prover/event_handler/block_proposed.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ func (h *BlockProposedGuaridanEventHandler) Handle(
// If we are operating as a guardian prover,
// we should sign all seen proposed blocks as soon as possible.
go func() {
if h.GuardianProverHeartbeater == nil {
return
}
if err := h.GuardianProverHeartbeater.SignAndSendBlock(ctx, event.BlockId); err != nil {
log.Error("Guardian prover unable to sign block", "blockID", event.BlockId, "error", err)
}
Expand Down

0 comments on commit 4076324

Please sign in to comment.