Skip to content

Commit

Permalink
Remove useless anon functions (#2326)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Nov 17, 2023
1 parent e7ca38b commit 5236d72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions snow/engine/snowman/bootstrap/bootstrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,7 @@ func (b *bootstrapper) checkFinish(ctx context.Context) error {
// If there is an additional callback, notify them that this chain has been
// synced.
if b.Bootstrapped != nil {
b.bootstrappedOnce.Do(func() {
b.Bootstrapped()
})
b.bootstrappedOnce.Do(b.Bootstrapped)
}

// Notify the subnet that this chain is synced
Expand Down
4 changes: 1 addition & 3 deletions snow/networking/timeout/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,5 @@ func (m *manager) RegisterRequestToUnreachableValidator() {
}

func (m *manager) Stop() {
m.stopOnce.Do(func() {
m.tm.Stop()
})
m.stopOnce.Do(m.tm.Stop)
}

0 comments on commit 5236d72

Please sign in to comment.