From da277482bbdf8513097adac7149a3a632a26e56e Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 15 Jul 2025 19:17:06 +0800 Subject: [PATCH] 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. --- walletunlocker/service_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/walletunlocker/service_test.go b/walletunlocker/service_test.go index 62dfc28d7..b85b64ad1 100644 --- a/walletunlocker/service_test.go +++ b/walletunlocker/service_test.go @@ -630,12 +630,13 @@ func doChangePassword(service *walletunlocker.UnlockerService, testDir string, if !bytes.Equal(response.AdminMacaroon, testMac) { errChan <- fmt.Errorf("mismatched macaroon: expected %x, got "+ "%x", testMac, response.AdminMacaroon) + return } // Close the macaroon DB and try to open it and read the root key with // the new password. store, err := openOrCreateTestMacStore( - testDir, &testPassword, testNetParams, + testDir, &req.NewPassword, testNetParams, ) if err != nil { errChan <- fmt.Errorf("could not create test store: %w", err)