waddrmgr/db: remove LatestVersion const in favor of getLatestVersion

In this commit, we can remove the LatestVersion constant as it's no
longer needed. Instead, we'll now define the latest version as the last
entry in the slice of versions previously defined.
This commit is contained in:
Wilmer Paulino 2018-11-02 18:42:51 -07:00
parent b05148bb8b
commit 1e582298b2
No known key found for this signature in database
GPG key ID: 6DF57B9F9514972F

View file

@ -16,15 +16,13 @@ import (
"github.com/btcsuite/btcwallet/walletdb" "github.com/btcsuite/btcwallet/walletdb"
) )
const (
// LatestMgrVersion is the most recent manager version.
LatestMgrVersion = 5
)
var ( var (
// LatestMgrVersion is the most recent manager version.
LatestMgrVersion = getLatestVersion()
// latestMgrVersion is the most recent manager version as a variable so // latestMgrVersion is the most recent manager version as a variable so
// the tests can change it to force errors. // the tests can change it to force errors.
latestMgrVersion uint32 = LatestMgrVersion latestMgrVersion = LatestMgrVersion
) )
// ObtainUserInputFunc is a function that reads a user input and returns it as // ObtainUserInputFunc is a function that reads a user input and returns it as