lnd: use errors.Is for error comparison

This commit is contained in:
Elle Mouton 2024-11-27 10:15:30 +02:00
parent ed4279b6f3
commit 8862ce99d5
No known key found for this signature in database
GPG Key ID: D7D916376026F177

2
lnd.go
View File

@ -470,7 +470,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, implCfg *ImplementationCfg,
dbs, cleanUp, err := implCfg.DatabaseBuilder.BuildDatabase(ctx) dbs, cleanUp, err := implCfg.DatabaseBuilder.BuildDatabase(ctx)
switch { switch {
case err == channeldb.ErrDryRunMigrationOK: case errors.Is(err, channeldb.ErrDryRunMigrationOK):
ltndLog.InfoS(ctx, "Exiting due to BuildDatabase error", ltndLog.InfoS(ctx, "Exiting due to BuildDatabase error",
slog.Any("err", err)) slog.Any("err", err))
return nil return nil