From 5ef1317093fd68aa59ac331cbdea9c8ba3978d48 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Wed, 30 Mar 2022 09:33:00 +0200 Subject: [PATCH] go/upgrade: Add empty upgrade handler --- go/upgrade/migrations/empty.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 go/upgrade/migrations/empty.go diff --git a/go/upgrade/migrations/empty.go b/go/upgrade/migrations/empty.go new file mode 100644 index 00000000000..b7e7eeec129 --- /dev/null +++ b/go/upgrade/migrations/empty.go @@ -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{}) +}