Skip to content

Commit

Permalink
go/upgrade: Add empty upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Mar 30, 2022
1 parent 6a493b2 commit 5ef1317
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions go/upgrade/migrations/empty.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package migrations

const (
// EmptyHandler is the name of the upgrade handler that doesn't perform any updates.
EmptyHandler = "empty"
)

var _ Handler = (*emptyHandler)(nil)

type emptyHandler struct{}

func (th *emptyHandler) StartupUpgrade(ctx *Context) error {
// Nothing to do.
return nil
}

func (th *emptyHandler) ConsensusUpgrade(ctx *Context, privateCtx interface{}) error {
// Nothing to do.
return nil
}

func init() {
Register(EmptyHandler, &emptyHandler{})
}

0 comments on commit 5ef1317

Please sign in to comment.