Apply suggestions from code review

Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
This commit is contained in:
Aarsh Shah
2026-01-05 11:27:56 +05:30
committed by GitHub
parent 29eed62696
commit db544fae4a

View File

@@ -108,7 +108,7 @@ func (s *Service) addToBatch(ctx context.Context, batch *pubsub.MessageBatch, to
// Wait for at least 1 peer to be available to receive the published message.
for {
if len(topicHandle.ListPeers()) > 0 || flags.Get().MinimumSyncPeers == 0 {
if flags.Get().MinimumSyncPeers == 0 || len(topicHandle.ListPeers()) > 0 {
return topicHandle.AddToBatch(ctx, batch, data, opts...)
}
select {