mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-08 14:31:53 +02:00
server: optimize message broadcast+targeted send
This commit slightly optimizes the process of broadcasting a message to a list of peers, and also sending a set of messages to a target peer. When broadcasting a message to a set of target peers, we now launch a goroutine for each send as to not block the ChannelRouter on an individual send. When sending a set of messages to a target peer, we now give up the mutex as soon as we’ve access the map, rather than holding onto it until the sending is complete.
This commit is contained in:
@ -1735,6 +1735,8 @@ func (r *rpcServer) GetNetworkInfo(context.Context, *lnrpc.NetworkInfoRequest) (
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO(roasbeef): graph diameter
|
||||
|
||||
// TODO(roasbeef): also add oldest channel?
|
||||
// * also add median channel size
|
||||
return &lnrpc.NetworkInfo{
|
||||
|
Reference in New Issue
Block a user