Skip to content

Commit

Permalink
Remove unneeded double check for error
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Jul 17, 2023
1 parent 9dfa9b0 commit a214f17
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions activation/activation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"sync"
"time"

"github.com/spacemeshos/post/initialization"
"github.com/spacemeshos/post/proving"
"github.com/spacemeshos/post/shared"
"go.uber.org/atomic"
Expand Down Expand Up @@ -207,13 +206,9 @@ func (b *Builder) StartSmeshing(coinbase types.Address, opts PostSetupOpts) erro
// If start session returns any error other than context.Canceled
// (which is how we signal it to stop) then we panic.
err := b.postSetupProvider.StartSession(ctx)

var labelErr initialization.ErrReferenceLabelMismatch
switch {
case errors.Is(err, context.Canceled):
return nil
case errors.As(err, &labelErr):
// TODO communicate error to the user
case err != nil:
b.log.Panic("initialization failed: %v", err)
}
Expand Down

0 comments on commit a214f17

Please sign in to comment.