@@ -78,12 +78,6 @@ type queryOptions struct {
7878 // it's run in a goroutine.
7979 doneChan chan <- struct {}
8080
81- // persistToDisk indicates whether the filter should also be written
82- // to disk in addition to the memory cache. For "normal" wallets, they'll
83- // almost never need to re-match a filter once it's been fetched unless
84- // they're doing something like a key import.
85- persistToDisk bool
86-
8781 // optimisticBatch indicates whether we expect more calls to follow,
8882 // and that we should attempt to batch more items with the query such
8983 // that they can be cached, avoiding the extra round trip.
@@ -179,14 +173,6 @@ func DoneChan(doneChan chan<- struct{}) QueryOption {
179173 }
180174}
181175
182- // PersistToDisk allows the caller to tell that the filter should be kept
183- // on disk once it's found.
184- func PersistToDisk () QueryOption {
185- return func (qo * queryOptions ) {
186- qo .persistToDisk = true
187- }
188- }
189-
190176// OptimisticBatch allows the caller to tell that items following the requested
191177// one should be included in the query.
192178func OptimisticBatch () QueryOption {
@@ -792,7 +778,7 @@ func (s *ChainService) handleCFiltersResponse(q *cfiltersQuery,
792778
793779 qo := defaultQueryOptions ()
794780 qo .applyQueryOptions (q .options ... )
795- if qo .persistToDisk {
781+ if s .persistToDisk {
796782 err = s .FilterDB .PutFilter (
797783 & response .BlockHash , gotFilter , dbFilterType ,
798784 )
0 commit comments