func NewMigrationManager(ns walletdb.ReadWriteBucket) *MigrationManager {
	return &MigrationManager{ns: ns}
}
NewMigrationManager creates a new migration manager for the address manager.
The given bucket should reflect the top-level bucket in which all of the
address manager's data is contained within.
package waddrmgr
import (
	"errors"
	"fmt"
	"time"
	"github.com/gcash/bchd/chaincfg"
	"github.com/gcash/bchwallet/walletdb"
	"github.com/gcash/bchwallet/walletdb/migration"
)
var versions = []migration.Version{
	{
		Number:    2,
		Migration: upgradeToVersion2,
	},
	{
		Number:    5,
		Migration: upgradeToVersion5,
	},
	{
		Number:    6,
		Migration: populateBirthdayBlock,
	},
	{
		Number:    7,
		Migration: resetSyncedBlockToBirthday,
	},
	{
		Number:    8,
		Migration: storeMaxReorgDepth,
	},
}
func getLatestVersion() uint32 {
	return versions[len(versions)-1].Number
}
type MigrationManager struct {
	ns walletdb.ReadWriteBucket
}
var _ migration.Manager = (*MigrationManager)(nil)