com.google.bitcoin.core
Interface PeerFilterProvider

All Known Implementing Classes:
Wallet

public interface PeerFilterProvider

An interface which provides the information required to properly filter data downloaded from Peers. Note that an implementer is responsible for calling PeerGroup#recalculateFastCatchupAndFilter(boolean) whenever a change occurs which effects the data provided via this interface.


Method Summary
 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.
 boolean isRequiringUpdateAllBloomFilter()
          Whether this filter provider depends on the server updating the filter on all matches
 

Method Detail

getEarliestKeyCreationTime

long getEarliestKeyCreationTime()
Returns the earliest timestamp (seconds since epoch) for which full/bloom-filtered blocks must be downloaded. Blocks with timestamps before this time will only have headers downloaded. 0 requires that all blocks be downloaded, and thus this should default to System.currentTimeMillis()/1000.


getBloomFilterElementCount

int getBloomFilterElementCount()
Gets the number of elements that will be added to a bloom filter returned by getBloomFilter(int, double, long)


getBloomFilter

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. Default value should be an empty bloom filter with the given size, falsePositiveRate, and nTweak.


isRequiringUpdateAllBloomFilter

boolean isRequiringUpdateAllBloomFilter()
Whether this filter provider depends on the server updating the filter on all matches



Copyright © 2014. All rights reserved.