Skip to content

Commit a50a92a

Browse files
authored
Merge pull request #300 from djkazic/improve-neutrino-performance-with-slow-networks
neutrino: improve perf in high latency networks
2 parents 1ea6f52 + c8fd04d commit a50a92a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

neutrino.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ func NewChainService(cfg Config) (*ChainService, error) {
753753
if s.persistToDisk {
754754
cfg := &chanutils.BatchWriterConfig[*filterdb.FilterData]{
755755
QueueBufferSize: chanutils.DefaultQueueSize,
756-
MaxBatch: 1000,
756+
MaxBatch: 10,
757757
DBWritesTickerDuration: time.Millisecond * 500,
758758
PutItems: s.FilterDB.PutFilters,
759759
}

query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var (
4949
// each peer before we've concluded we aren't going to get a valid
5050
// response. This allows to make up for missed messages in some
5151
// instances.
52-
QueryNumRetries = 2
52+
QueryNumRetries = 8
5353

5454
// QueryPeerConnectTimeout specifies how long to wait for the
5555
// underlying chain service to connect to a peer before giving up

rescan.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ func (rs *rescanState) handleBlockConnected(ntfn *blockntfns.Connected) error {
956956

957957
// Otherwise, we'll attempt to fetch the filter to retrieve the relevant
958958
// transactions and notify them.
959-
queryOptions := NumRetries(0)
959+
queryOptions := NumRetries(2)
960960
blockFilter, err := chain.GetCFilter(
961961
newStamp.Hash, wire.GCSFilterRegular, queryOptions,
962962
)

0 commit comments

Comments
 (0)