org.bitcoinj.core.Block.unCacheHeader()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(89)

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

Block.unCacheHeader介绍

暂无

代码示例

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

public void setTime(long time) {
  unCacheHeader();
  this.time = time;
  this.hash = null;
}

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

public void setTime(long time) {
  unCacheHeader();
  this.time = time;
  this.hash = null;
}

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

/** Exists only for unit testing. */
void setMerkleRoot(Sha256Hash value) {
  unCacheHeader();
  merkleRoot = value;
  hash = null;
}

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

/** Sets the difficulty target in compact form. */
public void setDifficultyTarget(long compactForm) {
  unCacheHeader();
  this.difficultyTarget = compactForm;
  this.hash = null;
}

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

void setPrevBlockHash(Sha256Hash prevBlockHash) {
  unCacheHeader();
  this.prevBlockHash = prevBlockHash;
  this.hash = null;
}

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

private void unCacheTransactions() {
  transactionBytesValid = false;
  if (!headerBytesValid)
    payload = null;
  // Current implementation has to uncache headers as well as any change to a tx will alter the merkle root. In
  // future we can go more granular and cache merkle root separately so rest of the header does not need to be
  // rewritten.
  unCacheHeader();
  // Clear merkleRoot last as it may end up being parsed during unCacheHeader().
  merkleRoot = null;
}

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

private void unCacheTransactions() {
  transactionBytesValid = false;
  if (!headerBytesValid)
    payload = null;
  // Current implementation has to uncache headers as well as any change to a tx will alter the merkle root. In
  // future we can go more granular and cache merkle root separately so rest of the header does not need to be
  // rewritten.
  unCacheHeader();
  // Clear merkleRoot last as it may end up being parsed during unCacheHeader().
  merkleRoot = null;
}

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

void setPrevBlockHash(Sha256Hash prevBlockHash) {
  unCacheHeader();
  this.prevBlockHash = prevBlockHash;
  this.hash = null;
}

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

private void unCacheTransactions() {
  transactionBytesValid = false;
  if (!headerBytesValid)
    payload = null;
  // Current implementation has to uncache headers as well as any change to a tx will alter the merkle root. In
  // future we can go more granular and cache merkle root separately so rest of the header does not need to be
  // rewritten.
  unCacheHeader();
  // Clear merkleRoot last as it may end up being parsed during unCacheHeader().
  merkleRoot = null;
}

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

/** Sets the difficulty target in compact form. */
public void setDifficultyTarget(long compactForm) {
  unCacheHeader();
  this.difficultyTarget = compactForm;
  this.hash = null;
}

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

/** Sets the nonce and clears any cached data. */
public void setNonce(long nonce) {
  unCacheHeader();
  this.nonce = nonce;
  this.hash = null;
}

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

private void unCacheTransactions() {
  transactionBytesValid = false;
  if (!headerBytesValid)
    payload = null;
  // Current implementation has to uncache headers as well as any change to a tx will alter the merkle root. In
  // future we can go more granular and cache merkle root separately so rest of the header does not need to be
  // rewritten.
  unCacheHeader();
  // Clear merkleRoot last as it may end up being parsed during unCacheHeader().
  merkleRoot = null;
}

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

/** Exists only for unit testing. */
void setMerkleRoot(Sha256Hash value) {
  unCacheHeader();
  merkleRoot = value;
  hash = null;
}

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

/** Sets the difficulty target in compact form. */
public void setDifficultyTarget(long compactForm) {
  unCacheHeader();
  this.difficultyTarget = compactForm;
  this.hash = null;
}

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

/** Sets the nonce and clears any cached data. */
public void setNonce(long nonce) {
  unCacheHeader();
  this.nonce = nonce;
  this.hash = null;
}

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

/** Exists only for unit testing. */
void setMerkleRoot(Sha256Hash value) {
  unCacheHeader();
  merkleRoot = value;
  hash = null;
}

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

/**
 * Returns the merkle root in big endian form, calculating it from transactions if necessary.
 */
public Sha256Hash getMerkleRoot() {
  if (merkleRoot == null) {
    //TODO check if this is really necessary.
    unCacheHeader();
    merkleRoot = calculateMerkleRoot();
  }
  return merkleRoot;
}

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

/**
 * Returns the merkle root in big endian form, calculating it from transactions if necessary.
 */
public Sha256Hash getMerkleRoot() {
  if (merkleRoot == null) {
    //TODO check if this is really necessary.
    unCacheHeader();
    merkleRoot = calculateMerkleRoot();
  }
  return merkleRoot;
}

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

/**
 * Returns the merkle root in big endian form, calculating it from transactions if necessary.
 */
public Sha256Hash getMerkleRoot() {
  if (merkleRoot == null) {
    //TODO check if this is really necessary.
    unCacheHeader();
    merkleRoot = calculateMerkleRoot();
  }
  return merkleRoot;
}

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

/**
 * Returns the merkle root in big endian form, calculating it from transactions if necessary.
 */
public Sha256Hash getMerkleRoot() {
  if (merkleRoot == null) {
    //TODO check if this is really necessary.
    unCacheHeader();
    merkleRoot = calculateMerkleRoot();
  }
  return merkleRoot;
}

相关文章

微信公众号

最新文章

更多