org.bitcoinj.wallet.Wallet.endBloomFilterCalculation()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中org.bitcoinj.wallet.Wallet.endBloomFilterCalculation()方法的一些代码示例,展示了Wallet.endBloomFilterCalculation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wallet.endBloomFilterCalculation()方法的具体详情如下:
包路径:org.bitcoinj.wallet.Wallet
类名称:Wallet
方法名:endBloomFilterCalculation

Wallet.endBloomFilterCalculation介绍

暂无

代码示例

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

/**
 * Returns the number of distinct data items (note: NOT keys) that will be inserted into a bloom filter, when it
 * is constructed.
 */
@Override
public int getBloomFilterElementCount() {
  beginBloomFilterCalculation();
  try {
    int size = bloomOutPoints.size();
    size += keyChainGroup.getBloomFilterElementCount();
    // Some scripts may have more than one bloom element.  That should normally be okay, because under-counting
    // just increases false-positive rate.
    size += watchedScripts.size();
    return size;
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: fr.acinq/bitcoinj-core

/**
 * Returns the number of distinct data items (note: NOT keys) that will be inserted into a bloom filter, when it
 * is constructed.
 */
@Override
public int getBloomFilterElementCount() {
  beginBloomFilterCalculation();
  try {
    int size = bloomOutPoints.size();
    size += keyChainGroup.getBloomFilterElementCount();
    // Some scripts may have more than one bloom element.  That should normally be okay, because under-counting
    // just increases false-positive rate.
    size += watchedScripts.size();
    return size;
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: greenaddress/GreenBits

/**
 * Returns the number of distinct data items (note: NOT keys) that will be inserted into a bloom filter, when it
 * is constructed.
 */
@Override
public int getBloomFilterElementCount() {
  beginBloomFilterCalculation();
  try {
    int size = bloomOutPoints.size();
    size += keyChainGroup.getBloomFilterElementCount();
    // Some scripts may have more than one bloom element.  That should normally be okay, because under-counting
    // just increases false-positive rate.
    size += watchedScripts.size();
    return size;
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: HashEngineering/dashj

/**
 * Returns the number of distinct data items (note: NOT keys) that will be inserted into a bloom filter, when it
 * is constructed.
 */
@Override
public int getBloomFilterElementCount() {
  beginBloomFilterCalculation();
  try {
    int size = bloomOutPoints.size();
    size += keyChainGroup.getBloomFilterElementCount();
    // Some scripts may have more than one bloom element.  That should normally be okay, because under-counting
    // just increases false-positive rate.
    size += watchedScripts.size();
    return size;
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: greenaddress/GreenBits

/**
 * Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given
 * false-positive rate. See the docs for {@link BloomFilter} for a brief explanation of anonymity when using filters.
 */
public BloomFilter getBloomFilter(double falsePositiveRate) {
  beginBloomFilterCalculation();
  try {
    return getBloomFilter(getBloomFilterElementCount(), falsePositiveRate, (long) (Math.random() * Long.MAX_VALUE));
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

/**
 * Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given
 * false-positive rate. See the docs for {@link BloomFilter} for a brief explanation of anonymity when using filters.
 */
public BloomFilter getBloomFilter(double falsePositiveRate) {
  beginBloomFilterCalculation();
  try {
    return getBloomFilter(getBloomFilterElementCount(), falsePositiveRate, (long) (Math.random() * Long.MAX_VALUE));
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: fr.acinq/bitcoinj-core

/**
 * Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given
 * false-positive rate. See the docs for {@link BloomFilter} for a brief explanation of anonymity when using filters.
 */
public BloomFilter getBloomFilter(double falsePositiveRate) {
  beginBloomFilterCalculation();
  try {
    return getBloomFilter(getBloomFilterElementCount(), falsePositiveRate, (long) (Math.random() * Long.MAX_VALUE));
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: HashEngineering/dashj

/**
 * Gets a bloom filter that contains all of the public keys from this wallet, and which will provide the given
 * false-positive rate. See the docs for {@link BloomFilter} for a brief explanation of anonymity when using filters.
 */
public BloomFilter getBloomFilter(double falsePositiveRate) {
  beginBloomFilterCalculation();
  try {
    return getBloomFilter(getBloomFilterElementCount(), falsePositiveRate, (long) (Math.random() * Long.MAX_VALUE));
  } finally {
    endBloomFilterCalculation();
  }
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

return filter;
} finally {
  endBloomFilterCalculation();

代码示例来源:origin: greenaddress/GreenBits

return filter;
} finally {
  endBloomFilterCalculation();

代码示例来源:origin: fr.acinq/bitcoinj-core

return filter;
} finally {
  endBloomFilterCalculation();

代码示例来源:origin: HashEngineering/dashj

return filter;
} finally {
  endBloomFilterCalculation();

相关文章

微信公众号

最新文章

更多

Wallet类方法