本文整理了Java中org.bitcoinj.core.Block.setPrevBlockHash()
方法的一些代码示例,展示了Block.setPrevBlockHash()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.setPrevBlockHash()
方法的具体详情如下:
包路径:org.bitcoinj.core.Block
类名称:Block
方法名:setPrevBlockHash
暂无
代码示例来源:origin: cash.bitcoinj/bitcoinj-core
b.setPrevBlockHash(getHash());
代码示例来源:origin: fr.acinq/bitcoinj-core
b.setPrevBlockHash(getHash());
代码示例来源:origin: HashEngineering/dashj
b.setPrevBlockHash(getHash());
代码示例来源:origin: greenaddress/GreenBits
b.setPrevBlockHash(getHash());
代码示例来源:origin: greenaddress/GreenBits
private static Block getBlock2() throws Exception {
Block b2 = new Block(testNet, Block.BLOCK_VERSION_GENESIS);
b2.setMerkleRoot(Sha256Hash.wrap("addc858a17e21e68350f968ccd384d6439b64aafa6c193c8b9dd66320470838b"));
b2.setNonce(2642058077L);
b2.setTime(1296734343L);
b2.setPrevBlockHash(Sha256Hash.wrap("000000033cc282bc1fa9dcae7a533263fd7fe66490f550d80076433340831604"));
assertEquals("000000037b21cac5d30fc6fda2581cf7b2612908aed2abbcc429c45b0557a15f", b2.getHashAsString());
b2.verifyHeader();
return b2;
}
代码示例来源:origin: greenaddress/GreenBits
private static Block getBlock1() throws Exception {
Block b1 = new Block(testNet, Block.BLOCK_VERSION_GENESIS);
b1.setMerkleRoot(Sha256Hash.wrap("0e8e58ecdacaa7b3c6304a35ae4ffff964816d2b80b62b58558866ce4e648c10"));
b1.setNonce(236038445);
b1.setTime(1296734340);
b1.setPrevBlockHash(Sha256Hash.wrap("00000007199508e34a9ff81e6ec0c477a4cccff2a4767a8eee39c11db367b008"));
assertEquals("000000033cc282bc1fa9dcae7a533263fd7fe66490f550d80076433340831604", b1.getHashAsString());
b1.verifyHeader();
return b1;
}
代码示例来源:origin: greenaddress/GreenBits
bad.setPrevBlockHash(b2.getHash());
代码示例来源:origin: greenaddress/GreenBits
b44.addTransaction(t);
b44.setPrevBlockHash(b43.getHash());
b44.setTime(b43.block.getTimeSeconds() + 1);
b45.addTransaction(t, false);
b45.setPrevBlockHash(b44.getHash());
b45.setTime(b44.getTimeSeconds() + 1);
b46.setMerkleRoot(Sha256Hash.ZERO_HASH);
b46.setPrevBlockHash(b44.getHash());
b46.setTime(b44.getTimeSeconds() + 1);
内容来源于网络,如有侵权,请联系作者删除!