mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
walletunlocker: add missing return and wrong password
We are missing a return here, and we are testing opening the macaroon db using the new password, not the old one.
This commit is contained in:
@@ -630,12 +630,13 @@ func doChangePassword(service *walletunlocker.UnlockerService, testDir string,
|
|||||||
if !bytes.Equal(response.AdminMacaroon, testMac) {
|
if !bytes.Equal(response.AdminMacaroon, testMac) {
|
||||||
errChan <- fmt.Errorf("mismatched macaroon: expected %x, got "+
|
errChan <- fmt.Errorf("mismatched macaroon: expected %x, got "+
|
||||||
"%x", testMac, response.AdminMacaroon)
|
"%x", testMac, response.AdminMacaroon)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the macaroon DB and try to open it and read the root key with
|
// Close the macaroon DB and try to open it and read the root key with
|
||||||
// the new password.
|
// the new password.
|
||||||
store, err := openOrCreateTestMacStore(
|
store, err := openOrCreateTestMacStore(
|
||||||
testDir, &testPassword, testNetParams,
|
testDir, &req.NewPassword, testNetParams,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errChan <- fmt.Errorf("could not create test store: %w", err)
|
errChan <- fmt.Errorf("could not create test store: %w", err)
|
||||||
|
Reference in New Issue
Block a user