mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
routing: only log topology client sends if clients are active
This commit is contained in:
parent
57a7d58ef9
commit
d0509955a7
@ -107,12 +107,14 @@ type topologyClient struct {
|
|||||||
// notifyTopologyChange notifies all registered clients of a new change in
|
// notifyTopologyChange notifies all registered clients of a new change in
|
||||||
// graph topology in a non-blocking.
|
// graph topology in a non-blocking.
|
||||||
func (r *ChannelRouter) notifyTopologyChange(topologyDiff *TopologyChange) {
|
func (r *ChannelRouter) notifyTopologyChange(topologyDiff *TopologyChange) {
|
||||||
log.Tracef("Sending topology notification to %v clients %v",
|
if len(r.topologyClients) != 0 {
|
||||||
len(r.topologyClients),
|
log.Tracef("Sending topology notification to %v clients %v",
|
||||||
newLogClosure(func() string {
|
len(r.topologyClients),
|
||||||
return spew.Sdump(topologyDiff)
|
newLogClosure(func() string {
|
||||||
}),
|
return spew.Sdump(topologyDiff)
|
||||||
)
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
for _, client := range r.topologyClients {
|
for _, client := range r.topologyClients {
|
||||||
go func(c topologyClient) {
|
go func(c topologyClient) {
|
||||||
|
Loading…
Reference in New Issue
Block a user