This commit is contained in:
callebtc
2022-07-09 17:45:06 +02:00
parent 73ef389425
commit dd67e7ea25
2 changed files with 10 additions and 5 deletions

View File

@@ -139,10 +139,10 @@ func (app *app) interceptHtlcEvents(ctx context.Context, interceptor routerrpc.R
IncomingCircuitKey: event.IncomingCircuitKey, IncomingCircuitKey: event.IncomingCircuitKey,
} }
if <-decision_chan { if <-decision_chan {
log.Infof("[forward] ✅ Allow HTLC %s", Configuration.ForwardMode, forward_info_string) log.Infof("[forward] ✅ Allow HTLC %s", forward_info_string)
response.Action = routerrpc.ResolveHoldForwardAction_RESUME response.Action = routerrpc.ResolveHoldForwardAction_RESUME
} else { } else {
log.Infof("[forward] ❌ Deny HTLC %s", Configuration.ForwardMode, forward_info_string) log.Infof("[forward] ❌ Deny HTLC %s", forward_info_string)
response.Action = routerrpc.ResolveHoldForwardAction_FAIL response.Action = routerrpc.ResolveHoldForwardAction_FAIL
} }
err = interceptor.Send(response) err = interceptor.Send(response)

11
main.go
View File

@@ -49,12 +49,12 @@ func getClientConnection(ctx context.Context) (*grpc.ClientConn, error) {
grpc.WithBlock(), grpc.WithBlock(),
grpc.WithPerRPCCredentials(cred), grpc.WithPerRPCCredentials(cred),
} }
log.Infof("Connecting to LND...") log.Infof("Connecting to %s", Configuration.Host)
conn, err := grpc.DialContext(ctx, Configuration.Host, opts...) conn, err := grpc.DialContext(ctx, Configuration.Host, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
log.Infof("Connected to %s", Configuration.Host)
return conn, nil return conn, nil
} }
@@ -78,7 +78,12 @@ func main() {
log.Errorf("Could not get my pubkey: %s", err) log.Errorf("Could not get my pubkey: %s", err)
continue continue
} }
log.Info("My pubkey: ", app.myPubkey) myAlias, err := app.getNodeAlias(ctx, app.myPubkey)
if err == nil {
log.Infof("Connected to %s (%s)", myAlias, trimPubKey([]byte(app.myPubkey)))
} else {
log.Infof("Connected to %s", app.myPubkey)
}
var wg sync.WaitGroup var wg sync.WaitGroup
ctx = context.WithValue(ctx, ctxKeyWaitGroup, &wg) ctx = context.WithValue(ctx, ctxKeyWaitGroup, &wg)