Skip to content
11 changes: 11 additions & 0 deletions bwtest/mock/addr_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,17 @@ func (m *AddrStore) BirthdayBlock(
return args.Get(0).(waddrmgr.BlockStamp), args.Bool(1), args.Error(2)
}

// MasterHDPubKey returns the plaintext master HD public key bytes persisted
// for the wallet.
func (m *AddrStore) MasterHDPubKey(ns walletdb.ReadBucket) ([]byte, error) {
args := m.Called(ns)
if raw, ok := args.Get(0).([]byte); ok {
return raw, args.Error(1)
}

return nil, args.Error(1)
}

// IsWatchOnlyAccount determines if the account with the given key scope
// is set up as watch-only.
func (m *AddrStore) IsWatchOnlyAccount(ns walletdb.ReadBucket,
Expand Down
5 changes: 5 additions & 0 deletions waddrmgr/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ type AddrStore interface {
// BirthdayBlock returns the birthday block of the address store.
BirthdayBlock(ns walletdb.ReadBucket) (BlockStamp, bool, error)

// MasterHDPubKey returns the plaintext master HD public key bytes
// persisted for the wallet, or ErrNoExist when none is persisted (shell,
// watch-only, or pre-master-key wallets).
MasterHDPubKey(ns walletdb.ReadBucket) ([]byte, error)

// IsWatchOnlyAccount determines if the account with the given key scope
// is set up as watch-only.
IsWatchOnlyAccount(ns walletdb.ReadBucket, keyScope KeyScope,
Expand Down
2 changes: 1 addition & 1 deletion wallet/benchmark_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func setupBenchmarkWallet(tb testing.TB,
}

if w.sync == nil {
w.sync = newSyncer(w.cfg, w.addrStore, w.txStore, w)
w.sync = newSyncer(w.cfg, w.addrStore, w.txStore, w, w.store, w.id)
}

require.NotNil(tb, w.store)
Expand Down
1 change: 0 additions & 1 deletion wallet/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ var (
errDeriveFail = errors.New("derive fail")
errLoadStateFail = errors.New("load state fail")
errRollbackFail = errors.New("rollback fail")
errFetchFail = errors.New("fetch fail")
errCFilterFail = errors.New("cfilter fail")
errActiveMgrsFail = errors.New("active managers fail")

Expand Down
Loading
Loading