Skip to content

Commit

Permalink
fix: set node alias to open public channels
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Nov 4, 2024
1 parent d9b0acf commit 585eb56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lnclient/ldk/ldk.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events
ldkConfig.LogLevel = ldk_node.LogLevel(logLevel) + ldk_node.LogLevelGossip
}
builder := ldk_node.BuilderFromConfig(ldkConfig)
builder.SetNodeAlias("Alby Hub") // TODO: allow users to customize
builder.SetEntropyBip39Mnemonic(mnemonic, nil)
builder.SetNetwork(network)
builder.SetChainSourceEsplora(cfg.GetEnv().LDKEsploraServer, nil)
Expand All @@ -125,7 +126,6 @@ func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events
builder.RestoreEncodedChannelMonitors(getEncodedChannelMonitorsFromStaticChannelsBackup(staticChannelsBackup))
}

//builder.SetLogDirPath (filepath.Join(newpath, "./logs")); // missing?
node, err := builder.Build()

if err != nil {
Expand Down Expand Up @@ -176,7 +176,7 @@ func NewLDKService(ctx context.Context, cfg config.Config, eventPublisher events
if event == nil {
// if there is no event, wait before polling again to avoid 100% CPU usage
// TODO: remove this and use WaitNextEvent()
time.Sleep(time.Duration(1) * time.Millisecond)
time.Sleep(time.Duration(1000) * time.Millisecond)
continue
}

Expand Down

0 comments on commit 585eb56

Please sign in to comment.