File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ func (w *Waku) checkForMissingMessages() {
105
105
for {
106
106
select {
107
107
case <- t .C :
108
+ if w .IsConnExpensive {
109
+ w .logger .Debug ("skipping missing message verification due to using expensive connection" )
110
+ continue
111
+ }
112
+
108
113
w .logger .Debug ("checking for missing messages..." )
109
114
w .topicInterestMu .Lock ()
110
115
for _ , request := range w .topicInterest {
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ type Waku struct {
161
161
connectionNotifChan chan node.PeerConnection
162
162
connStatusSubscriptions map [string ]* types.ConnStatusSubscription
163
163
connStatusMu sync.Mutex
164
+ IsConnExpensive bool
164
165
onlineChecker * onlinechecker.DefaultOnlineChecker
165
166
166
167
logger * zap.Logger
@@ -1415,7 +1416,8 @@ func (w *Waku) Start() error {
1415
1416
}
1416
1417
1417
1418
w .ConnectionChanged (connection.State {
1418
- Offline : ! latestConnStatus .IsOnline ,
1419
+ Offline : ! latestConnStatus .IsOnline ,
1420
+ Expensive : w .IsConnExpensive ,
1419
1421
})
1420
1422
}
1421
1423
}
@@ -1809,6 +1811,8 @@ func (w *Waku) ConnectionChanged(state connection.State) {
1809
1811
}
1810
1812
1811
1813
w .onlineChecker .SetOnline (! state .Offline )
1814
+
1815
+ w .IsConnExpensive = state .Expensive
1812
1816
}
1813
1817
1814
1818
// seedBootnodesForDiscV5 tries to fetch bootnodes
You can’t perform that action at this time.
0 commit comments