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:
yyforyongyu
2025-07-15 19:17:06 +08:00
parent df6c02e3af
commit da277482bb

View File

@@ -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)