mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-26 21:51:27 +02:00
discovery: pass context to ProcessRemoteAnnouncement
With this, we move a context.TODO() out of the gossiper and into the brontide package - this will be removed in a future PR which focuses on threading contexts through that code.
This commit is contained in:
@@ -1989,9 +1989,13 @@ func newChanMsgStream(p *Brontide, cid lnwire.ChannelID) *msgStream {
|
||||
// channel announcements.
|
||||
func newDiscMsgStream(p *Brontide) *msgStream {
|
||||
apply := func(msg lnwire.Message) {
|
||||
// TODO(elle): thread contexts through the peer system properly
|
||||
// so that a parent context can be passed in here.
|
||||
ctx := context.TODO()
|
||||
|
||||
// TODO(yy): `ProcessRemoteAnnouncement` returns an error chan
|
||||
// and we need to process it.
|
||||
p.cfg.AuthGossiper.ProcessRemoteAnnouncement(msg, p)
|
||||
p.cfg.AuthGossiper.ProcessRemoteAnnouncement(ctx, msg, p)
|
||||
}
|
||||
|
||||
return newMsgStream(
|
||||
|
Reference in New Issue
Block a user