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.
This commit is contained in:
Viktor Torstensson 2026-06-09 18:29:39 +02:00
parent acc578770a
commit 4b6b445dd7
No known key found for this signature in database
GPG key ID: 961CC8259AE675D4

View file

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