mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
chainio: use package logger instead of instance logger
There's no guarantee that the `b.beat` is initialized when the dispatcher shuts down, especially with the case in the remote signer where no chainbackend is created.
This commit is contained in:
parent
c1740c14ba
commit
b0aa4ae2de
2 changed files with 11 additions and 0 deletions
|
|
@ -135,6 +135,14 @@ func (b *BlockbeatDispatcher) Stop() {
|
|||
}
|
||||
|
||||
func (b *BlockbeatDispatcher) log() btclog.Logger {
|
||||
// There's no guarantee that the `b.beat` is initialized when the
|
||||
// dispatcher shuts down, especially in the case where the node is
|
||||
// running as a remote signer, which doesn't have a chainbackend. In
|
||||
// that case we will use the package logger.
|
||||
if b.beat == nil {
|
||||
return clog
|
||||
}
|
||||
|
||||
return b.beat.logger()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@
|
|||
- [Fixed](https://github.com/lightningnetwork/lnd/pull/9921) a case where the
|
||||
spending notification of an output may be missed if wrong height hint is used.
|
||||
|
||||
- [Fixed](https://github.com/lightningnetwork/lnd/pull/9962) a case where the
|
||||
node may panic if it's running in the remote signer mode.
|
||||
|
||||
# New Features
|
||||
|
||||
## Functional Enhancements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue