Skip to content

Commit

Permalink
neutrino: improve perf in high latency networks
Browse files Browse the repository at this point in the history
  • Loading branch information
djkazic committed May 30, 2024
1 parent a2d891c commit c8fd04d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ func NewChainService(cfg Config) (*ChainService, error) {
if s.persistToDisk {
cfg := &chanutils.BatchWriterConfig[*filterdb.FilterData]{
QueueBufferSize: chanutils.DefaultQueueSize,
MaxBatch: 1000,
MaxBatch: 10,
DBWritesTickerDuration: time.Millisecond * 500,
PutItems: s.FilterDB.PutFilters,
}
Expand Down
2 changes: 1 addition & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var (
// each peer before we've concluded we aren't going to get a valid
// response. This allows to make up for missed messages in some
// instances.
QueryNumRetries = 2
QueryNumRetries = 8

// QueryPeerConnectTimeout specifies how long to wait for the
// underlying chain service to connect to a peer before giving up
Expand Down
2 changes: 1 addition & 1 deletion rescan.go
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ func (rs *rescanState) handleBlockConnected(ntfn *blockntfns.Connected) error {

// Otherwise, we'll attempt to fetch the filter to retrieve the relevant
// transactions and notify them.
queryOptions := NumRetries(0)
queryOptions := NumRetries(2)
blockFilter, err := chain.GetCFilter(
newStamp.Hash, wire.GCSFilterRegular, queryOptions,
)
Expand Down

0 comments on commit c8fd04d

Please sign in to comment.