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:
parent
1c9a7095b3
commit
252ecf8b00
2 changed files with 17 additions and 0 deletions
7
btcd.go
7
btcd.go
|
@ -112,6 +112,13 @@ func btcdMain() error {
|
||||||
loggers = setLogLevel(cfg.DebugLevel)
|
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.
|
// Load the block database.
|
||||||
db, err := loadBlockDB()
|
db, err := loadBlockDB()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
10
upgrade.go
Normal file
10
upgrade.go
Normal 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
|
||||||
|
}
|
Loading…
Reference in a new issue