public interface PeerFilterProvider
PeerGroup.recalculateFastCatchupAndFilter(org.bitcoinj.core.PeerGroup.FilterRecalculateMode)
whenever a change occurs which effects the data provided via this interface.Modifier and Type | Method and Description |
---|---|
BloomFilter |
getBloomFilter(int size,
double falsePositiveRate,
long nTweak)
Gets a bloom filter that contains all the necessary elements for the listener to receive relevant transactions.
|
int |
getBloomFilterElementCount()
Gets the number of elements that will be added to a bloom filter returned by
getBloomFilter(int, double, long) |
long |
getEarliestKeyCreationTime()
Returns the earliest timestamp (seconds since epoch) for which full/bloom-filtered blocks must be downloaded.
|
Lock |
getLock()
Returns an object that will be locked before any other methods are called and unlocked afterwards.
|
boolean |
isRequiringUpdateAllBloomFilter()
Whether this filter provider depends on the server updating the filter on all matches
|
long getEarliestKeyCreationTime()
System.currentTimeMillis()
/1000.int getBloomFilterElementCount()
getBloomFilter(int, double, long)
BloomFilter getBloomFilter(int size, double falsePositiveRate, long nTweak)
boolean isRequiringUpdateAllBloomFilter()
Lock getLock()
FilterMerger
to request the counts of a bunch of providers
with getBloomFilterElementCount()
, create a filter of the right size, call getBloomFilter(int, double, long)
and then the filter provider discovers it's been mutated in the mean time and now has a different number of
elements. For instance, a Wallet that has keys added to it whilst a filter recalc is in progress could cause
experience this race.Copyright © 2015. All rights reserved.