// TstRunWithManagerUnlocked calls the given callback with the manager unlocked, // and locks it again before returning. func TstRunWithManagerUnlocked(t *testing.T, mgr *waddrmgr.Manager, callback func()) { if err := mgr.Unlock(privPassphrase); err != nil { t.Fatal(err) } defer mgr.Lock() callback() }