Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Jan 22, 2024
1 parent 1470071 commit ffc9aa6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions prover/guardian_prover_sender/guardian_prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,17 @@ func (s *GuardianProverBlockSender) SignAndSendBlock(ctx context.Context, blockI
return err
}

return s.db.Put(
if err := s.db.Put(
db.BuildBlockKey(header.Time, header.Number.Uint64()),
db.BuildBlockValue(header.Hash().Bytes(),
signed,
blockID,
),
); err != nil {
return err
}

return nil
}

// sendSignedBlockReq is the actual method that sends the signed block to the health check server.
Expand All @@ -128,7 +133,8 @@ func (s *GuardianProverBlockSender) sendSignedBlockReq(
Prover: s.proverAddress,
}

if err := s.post(ctx, "signedBlock", req); err != nil {[]byte{
if err := s.post(ctx, "signedBlock", req); err != nil {
return err
}

log.Info("Guardian prover successfully signed block", "blockID", blockID.Uint64())
Expand Down

0 comments on commit ffc9aa6

Please sign in to comment.