mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-03 12:03:37 +02:00
lnd: set up messaging chans between peer and htlcSwitch
Each active channel now gains its a dedicated htlcManager goroutine which currently accepts to two golang channels, and a lightning channel. The “downstream” channel will be used for dispatched multi-hop payments sent from the htlcSwitch, while the “upstream” channel will be used once the readHandler de-multiplexes hltc add/timeout/settle messages. Each time a new channel is fully created after N confirmations, the peer’s channelManager registers the new link with the htlcSwitch. Once the channel is closed either cooperatively or non-cooperatively, then the link is unregistered.
This commit is contained in:
5
log.go
5
log.go
@ -25,6 +25,7 @@ var (
|
||||
srvrLog = btclog.Disabled
|
||||
ntfnLog = btclog.Disabled
|
||||
chdbLog = btclog.Disabled
|
||||
hswcLog = btclog.Disabled
|
||||
)
|
||||
|
||||
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
||||
@ -37,6 +38,7 @@ var subsystemLoggers = map[string]btclog.Logger{
|
||||
"NTFN": ntfnLog,
|
||||
"CHDB": chdbLog,
|
||||
"FNDG": fndgLog,
|
||||
"HSWC": hswcLog,
|
||||
}
|
||||
|
||||
// useLogger updates the logger references for subsystemID to logger. Invalid
|
||||
@ -74,6 +76,9 @@ func useLogger(subsystemID string, logger btclog.Logger) {
|
||||
|
||||
case "FNDG":
|
||||
fndgLog = logger
|
||||
|
||||
case "HSWC":
|
||||
hswcLog = logger
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user