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.
This commit is contained in:
Dave Collins 2013-09-15 13:39:28 -05:00
parent 1c9a7095b3
commit 252ecf8b00
2 changed files with 17 additions and 0 deletions

View file

@ -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 {

10
upgrade.go Normal file
View file

@ -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
}