From 4b6b445dd7fcbf0c38eda533d6444a1d025a0bce Mon Sep 17 00:00:00 2001 From: Viktor Torstensson Date: Tue, 9 Jun 2026 18:29:39 +0200 Subject: [PATCH] migsets: increase maxListMacaroonIDAttempts to 120 Due to that certain wallet setups, such as `lnd.noseedbackup`, can take a bit of time to open the `lnd` wallet, we need to increase the time we allow for the RPC call which lists the macaroon IDs. We therefore allow up to 60 seconds instead of 5 seconds for that to happen, to ensure that the kvdb->SQL migration doesn't fail in such setups. --- db/migsets/programmatic_migrations.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/db/migsets/programmatic_migrations.go b/db/migsets/programmatic_migrations.go index 983591af..70825375 100644 --- a/db/migsets/programmatic_migrations.go +++ b/db/migsets/programmatic_migrations.go @@ -152,10 +152,11 @@ func kvdbToSqlProgrammaticMigration(ctx context.Context, // We'll fetch the macaroonIDList from `lnd` next. Note that since lnd's // RPC servers may not have been fully started yet if the execution of // accounts and session migration were really quick, we poll the request - // up to 10 times with a 0.5 second delay between the attempts. This - // should be a sufficient amount of time for the RPC servers to start. + // up to 120 times with a 0.5 second delay between the attempts. This + // should be a sufficient amount of time for the wallet to have been + // loaded and for the RPC servers to started. const ( - maxListMacaroonIDAttempts = 10 + maxListMacaroonIDAttempts = 120 listMacaroonIDRetryDelay = 500 * time.Millisecond )