Skip to content

Commit

Permalink
return from grpc stream right after submission is successful
Browse files Browse the repository at this point in the history
  • Loading branch information
anomit committed Oct 4, 2024
1 parent 724c31a commit ec2971e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/service/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func NewMsgServerImpl() pkgs.SubmissionServer {
return stream, nil
}
return &server{
streamPool: newStreamPool(2048, sequencerID, createStream), // Adjust pool size as needed
streamPool: newStreamPool(20, sequencerID, createStream), // Adjust pool size as needed
}
}

Expand Down Expand Up @@ -155,6 +155,7 @@ func (s *server) SubmitSnapshot(stream pkgs.Submission_SubmitSnapshotServer) err
return stream.Send(&pkgs.SubmissionResponse{Message: "Failure: " + submissionId.String()})
}
log.Debugln("Stream write successful for ID: ", submissionId.String(), "for Epoch:", submission.Request.EpochId, "Slot:", submission.Request.SlotId)
return stream.Send(&pkgs.SubmissionResponse{Message: "Success: " + submissionId.String()})
}
}

Expand Down

0 comments on commit ec2971e

Please sign in to comment.