mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 22:50:58 +02:00
discovery: add comments to the ctx creation
We highlight why we do not use the returned cancel method of the context guard.
This commit is contained in:
@@ -409,6 +409,8 @@ func (g *GossipSyncer) Start() {
|
|||||||
g.started.Do(func() {
|
g.started.Do(func() {
|
||||||
log.Debugf("Starting GossipSyncer(%x)", g.cfg.peerPub[:])
|
log.Debugf("Starting GossipSyncer(%x)", g.cfg.peerPub[:])
|
||||||
|
|
||||||
|
// We do not call the cancel function here, because the global
|
||||||
|
// context quit method is enough to clean up the context guard.
|
||||||
ctx, _ := g.cg.Create(context.Background())
|
ctx, _ := g.cg.Create(context.Background())
|
||||||
|
|
||||||
// TODO(conner): only spawn channelGraphSyncer if remote
|
// TODO(conner): only spawn channelGraphSyncer if remote
|
||||||
|
@@ -4127,6 +4127,8 @@ func (p *Brontide) startRbfChanCloser(shutdown shutdownInit,
|
|||||||
defer rbfCloser.RemoveStateSub(coopCloseStates)
|
defer rbfCloser.RemoveStateSub(coopCloseStates)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We do not call the cancel function here, because the global
|
||||||
|
// context quit method is enough to clean up the context guard.
|
||||||
ctx, _ := p.cg.Create(context.Background())
|
ctx, _ := p.cg.Create(context.Background())
|
||||||
feeRate := defaultFeePerKw.FeePerVByte()
|
feeRate := defaultFeePerKw.FeePerVByte()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user