waddrmgr: export fast scrypt options

This commit is contained in:
Oliver Gugger 2020-01-17 11:39:38 +01:00
parent f93a69f8f3
commit 655c23db1d
No known key found for this signature in database
GPG key ID: 8E4256593F177720
2 changed files with 9 additions and 5 deletions

View file

@ -33,11 +33,7 @@ var (
// fastScrypt are parameters used throughout the tests to speed up the // fastScrypt are parameters used throughout the tests to speed up the
// scrypt operations. // scrypt operations.
fastScrypt = &ScryptOptions{ fastScrypt = &FastScryptOptions
N: 16,
R: 8,
P: 1,
}
// waddrmgrNamespaceKey is the namespace key for the waddrmgr package. // waddrmgrNamespaceKey is the namespace key for the waddrmgr package.
waddrmgrNamespaceKey = []byte("waddrmgrNamespace") waddrmgrNamespaceKey = []byte("waddrmgrNamespace")

View file

@ -123,6 +123,14 @@ var DefaultScryptOptions = ScryptOptions{
P: 1, P: 1,
} }
// FastScryptOptions are the scrypt options that should be used for testing
// purposes only where speed is more important than security.
var FastScryptOptions = ScryptOptions{
N: 16,
R: 8,
P: 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 // would end up being the same bitcoin address (as is the case for
// pay-to-pubkey and pay-to-pubkey-hash style of addresses). // pay-to-pubkey and pay-to-pubkey-hash style of addresses).