From 655c23db1dd83ed0a0d4ebd9e41da180274c3ace Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 17 Jan 2020 11:39:38 +0100 Subject: [PATCH] waddrmgr: export fast scrypt options --- waddrmgr/common_test.go | 6 +----- waddrmgr/manager.go | 8 ++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/waddrmgr/common_test.go b/waddrmgr/common_test.go index 1297199..20493fe 100644 --- a/waddrmgr/common_test.go +++ b/waddrmgr/common_test.go @@ -33,11 +33,7 @@ var ( // fastScrypt are parameters used throughout the tests to speed up the // scrypt operations. - fastScrypt = &ScryptOptions{ - N: 16, - R: 8, - P: 1, - } + fastScrypt = &FastScryptOptions // waddrmgrNamespaceKey is the namespace key for the waddrmgr package. waddrmgrNamespaceKey = []byte("waddrmgrNamespace") diff --git a/waddrmgr/manager.go b/waddrmgr/manager.go index 85d034d..b94c6ee 100644 --- a/waddrmgr/manager.go +++ b/waddrmgr/manager.go @@ -123,6 +123,14 @@ var DefaultScryptOptions = ScryptOptions{ 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 // would end up being the same bitcoin address (as is the case for // pay-to-pubkey and pay-to-pubkey-hash style of addresses).