mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 06:32:18 +02:00
lnd: add async updates for [open|close]channel RPC's
This commit modifies the internal workflow for opening or closing a channel in order to create a path in which RPC clients can receive updates. Updates are now communicated via channels from the goroutines spawned by the RPC server to process the request, and the sub-system within the daemon that actually executes the request. With this change clients can now receive updates that the request is pending (final message has been sent to the target client), or that the request has been completed. Confirmation related updates have not yet been implemented as that will require some changes to the ChainNotifier interface.
This commit is contained in:
2
lnd.go
2
lnd.go
@@ -143,7 +143,7 @@ func lndMain() error {
|
||||
lnrpc.RegisterLightningServer(grpcServer, server.rpcServer)
|
||||
|
||||
// Finally, start the grpc server listening for HTTP/2 connections.
|
||||
lis, err := net.Listen("tcp", fmt.Sprintf(":%d", loadedConfig.RPCPort))
|
||||
lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", loadedConfig.RPCPort))
|
||||
if err != nil {
|
||||
fmt.Printf("failed to listen: %v", err)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user