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

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

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

Block.isBIP65介绍

[英]Returns whether this block conforms to BIP65: OP_CHECKLOCKTIMEVERIFY.
[中]返回此块是否符合BIP65: OP_CHECKLOCKTIMEVERIFY

代码示例

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

/**
 * Returns a multi-line string containing a description of the contents of
 * the block. Use for debugging purposes only.
 */
@Override
public String toString() {
  StringBuilder s = new StringBuilder();
  s.append(" block: \n");
  s.append("   hash: ").append(getHashAsString()).append('\n');
  s.append("   version: ").append(version);
  String bips = Joiner.on(", ").skipNulls().join(isBIP34() ? "BIP34" : null, isBIP66() ? "BIP66" : null,
      isBIP65() ? "BIP65" : null);
  if (!bips.isEmpty())
    s.append(" (").append(bips).append(')');
  s.append('\n');
  s.append("   previous block: ").append(getPrevBlockHash()).append("\n");
  s.append("   merkle root: ").append(getMerkleRoot()).append("\n");
  s.append("   time: ").append(time).append(" (").append(Utils.dateTimeFormat(time * 1000)).append(")\n");
  s.append("   difficulty target (nBits): ").append(difficultyTarget).append("\n");
  s.append("   nonce: ").append(nonce).append("\n");
  if (transactions != null && transactions.size() > 0) {
    s.append("   with ").append(transactions.size()).append(" transaction(s):\n");
    for (Transaction tx : transactions) {
      s.append(tx);
    }
  }
  return s.toString();
}

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

/**
 * Returns a multi-line string containing a description of the contents of
 * the block. Use for debugging purposes only.
 */
@Override
public String toString() {
  StringBuilder s = new StringBuilder();
  s.append(" block: \n");
  s.append("   hash: ").append(getHashAsString()).append('\n');
  s.append("   version: ").append(version);
  String bips = Joiner.on(", ").skipNulls().join(isBIP34() ? "BIP34" : null, isBIP66() ? "BIP66" : null,
      isBIP65() ? "BIP65" : null);
  if (!bips.isEmpty())
    s.append(" (").append(bips).append(')');
  s.append('\n');
  s.append("   previous block: ").append(getPrevBlockHash()).append("\n");
  s.append("   merkle root: ").append(getMerkleRoot()).append("\n");
  s.append("   time: ").append(time).append(" (").append(Utils.dateTimeFormat(time * 1000)).append(")\n");
  s.append("   difficulty target (nBits): ").append(difficultyTarget).append("\n");
  s.append("   nonce: ").append(nonce).append("\n");
  if (transactions != null && transactions.size() > 0) {
    s.append("   with ").append(transactions.size()).append(" transaction(s):\n");
    for (Transaction tx : transactions) {
      s.append(tx);
    }
  }
  return s.toString();
}

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

/**
 * Returns a multi-line string containing a description of the contents of
 * the block. Use for debugging purposes only.
 */
@Override
public String toString() {
  StringBuilder s = new StringBuilder();
  s.append(" block: \n");
  s.append("   hash: ").append(getHashAsString()).append('\n');
  s.append("   version: ").append(version);
  String bips = Joiner.on(", ").skipNulls().join(isBIP34() ? "BIP34" : null, isBIP66() ? "BIP66" : null,
      isBIP65() ? "BIP65" : null);
  if (!bips.isEmpty())
    s.append(" (").append(bips).append(')');
  s.append('\n');
  s.append("   previous block: ").append(getPrevBlockHash()).append("\n");
  s.append("   merkle root: ").append(getMerkleRoot()).append("\n");
  s.append("   time: ").append(time).append(" (").append(Utils.dateTimeFormat(time * 1000)).append(")\n");
  s.append("   difficulty target (nBits): ").append(difficultyTarget).append("\n");
  s.append("   nonce: ").append(nonce).append("\n");
  if (transactions != null && transactions.size() > 0) {
    s.append("   with ").append(transactions.size()).append(" transaction(s):\n");
    for (Transaction tx : transactions) {
      s.append(tx);
    }
  }
  return s.toString();
}

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

/**
 * Returns a multi-line string containing a description of the contents of
 * the block. Use for debugging purposes only.
 */
@Override
public String toString() {
  StringBuilder s = new StringBuilder();
  s.append(" block: \n");
  s.append("   hash: ").append(getHashAsString()).append('\n');
  s.append("   version: ").append(version);
  String bips = Joiner.on(", ").skipNulls().join(isBIP34() ? "BIP34" : null, isBIP66() ? "BIP66" : null,
      isBIP65() ? "BIP65" : null);
  if (!bips.isEmpty())
    s.append(" (").append(bips).append(')');
  s.append('\n');
  s.append("   previous block: ").append(getPrevBlockHash()).append("\n");
  s.append("   merkle root: ").append(getMerkleRoot()).append("\n");
  s.append("   time: ").append(time).append(" (").append(Utils.dateTimeFormat(time * 1000)).append(")\n");
  s.append("   difficulty target (nBits): ").append(difficultyTarget).append("\n");
  s.append("   nonce: ").append(nonce).append("\n");
  if (transactions != null && transactions.size() > 0) {
    s.append("   with ").append(transactions.size()).append(" transaction(s):\n");
    for (Transaction tx : transactions) {
      s.append(tx);
    }
  }
  return s.toString();
}

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

assertFalse(genesis.isBIP34());
assertFalse(genesis.isBIP66());
assertFalse(genesis.isBIP65());
assertFalse(block227835.isBIP34());
assertFalse(block227835.isBIP66());
assertFalse(block227835.isBIP65());
assertTrue(block227836.isBIP34());
assertFalse(block227836.isBIP66());
assertFalse(block227836.isBIP65());
assertTrue(block363703.isBIP34());
assertTrue(block363703.isBIP66());
assertFalse(block363703.isBIP65());
assertTrue(block383616.isBIP34());
assertTrue(block383616.isBIP66());
assertTrue(block383616.isBIP65());
assertTrue(block370661.isBIP34());
assertTrue(block370661.isBIP66());
assertTrue(block370661.isBIP65());

相关文章