本文整理了Java中org.bitcoinj.core.Block.calculateMerkleRoot()
方法的一些代码示例,展示了Block.calculateMerkleRoot()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.calculateMerkleRoot()
方法的具体详情如下:
包路径:org.bitcoinj.core.Block
类名称:Block
方法名:calculateMerkleRoot
暂无
代码示例来源:origin: fr.acinq/bitcoinj-core
private Sha256Hash calculateMerkleRoot() {
return calculateMerkleRoot(false);
}
代码示例来源: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: 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: 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;
}
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
private void checkMerkleRoot() throws VerificationException {
Sha256Hash calculatedRoot = calculateMerkleRoot();
if (!calculatedRoot.equals(merkleRoot)) {
log.error("Merkle tree did not verify");
throw new VerificationException("Merkle hashes do not match: " + calculatedRoot + " vs " + merkleRoot);
}
}
代码示例来源:origin: greenaddress/GreenBits
private void checkMerkleRoot() throws VerificationException {
Sha256Hash calculatedRoot = calculateMerkleRoot();
if (!calculatedRoot.equals(merkleRoot)) {
log.error("Merkle tree did not verify");
throw new VerificationException("Merkle hashes do not match: " + calculatedRoot + " vs " + merkleRoot);
}
}
代码示例来源:origin: fr.acinq/bitcoinj-core
private void checkMerkleRoot() throws VerificationException {
Sha256Hash calculatedRoot = calculateMerkleRoot();
if (!calculatedRoot.equals(merkleRoot)) {
log.error("Merkle tree did not verify");
throw new VerificationException("Merkle hashes do not match: " + calculatedRoot + " vs " + merkleRoot);
}
}
代码示例来源:origin: HashEngineering/dashj
private void checkMerkleRoot() throws VerificationException {
Sha256Hash calculatedRoot = calculateMerkleRoot();
if (!calculatedRoot.equals(merkleRoot)) {
log.error("Merkle tree did not verify");
throw new VerificationException("Merkle hashes do not match: " + calculatedRoot + " vs " + merkleRoot);
}
}
代码示例来源:origin: fr.acinq/bitcoinj-core
final byte[] witnessMerkle = calculateMerkleRoot(true).getReversedBytes();
final byte[] witnessNonce = coinBase.getWitness(0).getPush(0);
final byte[] witnessRoot = Sha256Hash.hashTwice(
内容来源于网络,如有侵权,请联系作者删除!