Skip to content

Commit f953acb

Browse files
committed
go/worker/common/committee/keymanager: Wait for consensus sync
1 parent 6fd2525 commit f953acb

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

go/worker/common/committee/keymanager.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@ func (nt *nodeTracker) Nodes(nodes []signature.PublicKey) map[core.PeerID]signat
337337
}
338338

339339
func (nt *nodeTracker) trackKeymanagerNodes(ctx context.Context) {
340+
select {
341+
case <-nt.consensus.Synced():
342+
case <-ctx.Done():
343+
return
344+
}
345+
340346
stCh, stSub, err := nt.consensus.KeyManager().Secrets().WatchStatuses(ctx)
341347
if err != nil {
342348
nt.logger.Error("failed to watch key manager secrets statuses",

0 commit comments

Comments
 (0)