From 252ecf8b0024af88c4f299bc7ad916870903f794 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Sun, 15 Sep 2013 13:39:28 -0500 Subject: [PATCH] Add basic infrastructure for upgrading btcd. This commit adds a basic infrastructure to allow upgrades to happen to btcd as needed. This paves the way for the upcoming data path changes to be automatically updated for the user as needed and also ensures any future changes that might require upgrades already have an established way of performing the needed upgrades. --- btcd.go | 7 +++++++ upgrade.go | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 upgrade.go diff --git a/btcd.go b/btcd.go index 63e8be29..db665b30 100644 --- a/btcd.go +++ b/btcd.go @@ -112,6 +112,13 @@ func btcdMain() error { loggers = setLogLevel(cfg.DebugLevel) } + // Perform upgrades to btcd as new versions require it. + err = doUpgrades() + if err != nil { + log.Errorf("%v", err) + return err + } + // Load the block database. db, err := loadBlockDB() if err != nil { diff --git a/upgrade.go b/upgrade.go new file mode 100644 index 00000000..ebd9dfbe --- /dev/null +++ b/upgrade.go @@ -0,0 +1,10 @@ +// Copyright (c) 2013 Conformal Systems LLC. +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +package main + +// doUpgrades performs upgrades to btcd as new versions require it. +func doUpgrades() error { + return nil +}