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:
parent
402fcf0dd0
commit
fb7e87b1ef
1 changed files with 15 additions and 16 deletions
|
@ -76,6 +76,21 @@ const (
|
||||||
internalBranch uint32 = 1
|
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
|
// 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
|
// would end up being the same bitcoin address (as is the case for pay-to-pubkey
|
||||||
// and pay-to-pubkey-hash style of addresses).
|
// 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)
|
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
|
// 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
|
// seed must conform to the standards described in hdkeychain.NewMaster and will
|
||||||
// be used to create the master root node from which all hierarchical
|
// be used to create the master root node from which all hierarchical
|
||||||
|
|
Loading…
Reference in a new issue