mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 15:22:16 +00:00
Suppress some more info logging and update some javadocs.
This commit is contained in:
parent
462c75324e
commit
30455cb5ce
@ -428,9 +428,9 @@ public abstract class AbstractBlockChain {
|
|||||||
StoredBlock head = getChainHead();
|
StoredBlock head = getChainHead();
|
||||||
if (storedPrev.equals(head)) {
|
if (storedPrev.equals(head)) {
|
||||||
if (filtered && filteredTxn.size() > 0) {
|
if (filtered && filteredTxn.size() > 0) {
|
||||||
log.info(format("Block %s connects to top of best chain with %d transaction(s) of which we were sent %d",
|
log.debug("Block {} connects to top of best chain with {} transaction(s) of which we were sent {}",
|
||||||
block.getHashAsString(), filteredTxHashList.size(), filteredTxn.size()));
|
block.getHashAsString(), filteredTxHashList.size(), filteredTxn.size());
|
||||||
for (Sha256Hash hash : filteredTxHashList) log.info(" matched tx {}", hash);
|
for (Sha256Hash hash : filteredTxHashList) log.debug(" matched tx {}", hash);
|
||||||
}
|
}
|
||||||
if (expensiveChecks && block.getTimeSeconds() <= getMedianTimestampOfRecentBlocks(head, blockStore))
|
if (expensiveChecks && block.getTimeSeconds() <= getMedianTimestampOfRecentBlocks(head, blockStore))
|
||||||
throw new VerificationException("Block's timestamp is too early");
|
throw new VerificationException("Block's timestamp is too early");
|
||||||
|
@ -162,9 +162,13 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca
|
|||||||
|
|
||||||
// A bloom filter generated from all connected wallets that is given to new peers
|
// A bloom filter generated from all connected wallets that is given to new peers
|
||||||
private BloomFilter bloomFilter;
|
private BloomFilter bloomFilter;
|
||||||
/** A reasonable default for the bloom filter false positive rate on mainnet.
|
/**
|
||||||
* Users for which low data usage is of utmost concern, 0.0001 may be better, for users
|
* <p>A reasonable default for the bloom filter false positive rate on mainnet. FP rates are values between 0.0 and 1.0
|
||||||
* to whom anonymity is of utmost concern, 0.001 should provide very good privacy */
|
* where 1.0 is "all transactions" i.e. 100%.</p>
|
||||||
|
*
|
||||||
|
* <p>Users for which low data usage is of utmost concern, 0.0001 may be better, for users
|
||||||
|
* to whom anonymity is of utmost concern, 0.001 (0.1%) should provide very good privacy.</p>
|
||||||
|
*/
|
||||||
public static final double DEFAULT_BLOOM_FILTER_FP_RATE = 0.0005;
|
public static final double DEFAULT_BLOOM_FILTER_FP_RATE = 0.0005;
|
||||||
/** Maximum increase in FP rate before forced refresh of the bloom filter */
|
/** Maximum increase in FP rate before forced refresh of the bloom filter */
|
||||||
public static final double MAX_FP_RATE_INCREASE = 2.0f;
|
public static final double MAX_FP_RATE_INCREASE = 2.0f;
|
||||||
@ -666,12 +670,13 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the false positive rate of bloom filters given to peers.
|
* <p>Sets the false positive rate of bloom filters given to peers. The default is {@link #DEFAULT_BLOOM_FILTER_FP_RATE}.</p>
|
||||||
* Be careful regenerating the bloom filter too often, as it decreases anonymity because remote nodes can
|
*
|
||||||
* compare transactions against both the new and old filters to significantly decrease the false positive rate.
|
* <p>Be careful regenerating the bloom filter too often, as it decreases anonymity because remote nodes can
|
||||||
|
* compare transactions against both the new and old filters to significantly decrease the false positive rate.</p>
|
||||||
*
|
*
|
||||||
* See the docs for {@link BloomFilter#BloomFilter(int, double, long, BloomFilter.BloomUpdate)} for a brief
|
* <p>See the docs for {@link BloomFilter#BloomFilter(int, double, long, BloomFilter.BloomUpdate)} for a brief
|
||||||
* explanation of anonymity when using bloom filters.
|
* explanation of anonymity when using bloom filters.</p>
|
||||||
*/
|
*/
|
||||||
public void setBloomFilterFalsePositiveRate(double bloomFilterFPRate) {
|
public void setBloomFilterFalsePositiveRate(double bloomFilterFPRate) {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
Loading…
Reference in New Issue
Block a user