Move new addrmgr Options type and default to top.

Default values near the top of the file is preferrable so they are more
easily spotted.
This commit is contained in:
Dave Collins 2014-10-29 02:27:38 -05:00
parent 402fcf0dd0
commit fb7e87b1ef

View file

@ -76,6 +76,21 @@ const (
internalBranch uint32 = 1
)
// Options is used to hold the optional parameters passed to Create or Load.
type Options struct {
ScryptN int
ScryptR int
ScryptP int
}
// defaultConfig is an instance of the Options struct initialized with default
// configuration options.
var defaultConfig = &Options{
ScryptN: 262144, // 2^18
ScryptR: 8,
ScryptP: 1,
}
// addrKey is used to uniquely identify an address even when those addresses
// would end up being the same bitcoin address (as is the case for pay-to-pubkey
// and pay-to-pubkey-hash style of addresses).
@ -1661,22 +1676,6 @@ func Open(dbPath string, pubPassphrase []byte, net *btcnet.Params, config *Optio
return loadManager(db, pubPassphrase, net, config)
}
// Options is used to hold the optional parameters passed to Create or
// Load.
type Options struct {
ScryptN int
ScryptR int
ScryptP int
}
// defaultConfig is an instance of the Options struct initialized with
// default configuration options.
var defaultConfig = &Options{
ScryptN: 262144, // 2^18
ScryptR: 8,
ScryptP: 1,
}
// Create returns a new locked address manager at the given database path. The
// seed must conform to the standards described in hdkeychain.NewMaster and will
// be used to create the master root node from which all hierarchical