File tree Expand file tree Collapse file tree 4 files changed +31
-7
lines changed Expand file tree Collapse file tree 4 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -860,8 +860,6 @@ func (d *AuthenticatedGossiper) stop() {
860
860
func (d * AuthenticatedGossiper ) ProcessRemoteAnnouncement (ctx context.Context ,
861
861
msg lnwire.Message , peer lnpeer.Peer ) chan error {
862
862
863
- log .Debugf ("Processing remote msg %T from peer=%x" , msg , peer .PubKey ())
864
-
865
863
errChan := make (chan error , 1 )
866
864
867
865
// For messages in the known set of channel series queries, we'll
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ const (
175
175
requestBatchSize = 500
176
176
177
177
// syncerBufferSize is the size of the syncer's buffers.
178
- syncerBufferSize = 5
178
+ syncerBufferSize = 50
179
179
)
180
180
181
181
var (
Original file line number Diff line number Diff line change 20
20
21
21
# Bug Fixes
22
22
23
- * [ Fix a serialisation bug] ( https://github.com/lightningnetwork/lnd/pull/9856 )
23
+ - [ Fix a serialisation bug] ( https://github.com/lightningnetwork/lnd/pull/9856 )
24
24
that would occur when an attempt was made to write a backup file for a channel
25
25
peer that has advertised an address that we do not yet know how to parse.
26
26
38
38
39
39
## Functional Enhancements
40
40
41
+ - [ Increase] ( https://github.com/lightningnetwork/lnd/pull/9875 ) gossip sync
42
+ buffer to take the pressure of the read handler.
43
+
41
44
## RPC Additions
42
45
43
46
## lncli Additions
Original file line number Diff line number Diff line change @@ -1995,9 +1995,32 @@ func newDiscMsgStream(p *Brontide) *msgStream {
1995
1995
// so that a parent context can be passed in here.
1996
1996
ctx := context .TODO ()
1997
1997
1998
- // TODO(yy): `ProcessRemoteAnnouncement` returns an error chan
1999
- // and we need to process it.
2000
- p .cfg .AuthGossiper .ProcessRemoteAnnouncement (ctx , msg , p )
1998
+ p .log .Debugf ("Processing remote msg %T" , msg )
1999
+
2000
+ errChan := p .cfg .AuthGossiper .ProcessRemoteAnnouncement (
2001
+ ctx , msg , p ,
2002
+ )
2003
+
2004
+ // Start a goroutine to process the error channel for logging
2005
+ // purposes.
2006
+ //
2007
+ // TODO(ziggie): Maybe use the error to potentially punish the
2008
+ // peer depending on the error ?
2009
+ go func () {
2010
+ select {
2011
+ case <- p .cg .Done ():
2012
+ return
2013
+
2014
+ case err := <- errChan :
2015
+ if err != nil {
2016
+ p .log .Warnf ("Error processing remote " +
2017
+ "msg %T: %v" , msg ,
2018
+ err )
2019
+ }
2020
+ }
2021
+
2022
+ p .log .Debugf ("Processed remote msg %T" , msg )
2023
+ }()
2001
2024
}
2002
2025
2003
2026
return newMsgStream (
You can’t perform that action at this time.
0 commit comments