本文整理了Java中org.bitcoinj.wallet.Wallet.setKeyChainGroupLookaheadSize()
方法的一些代码示例,展示了Wallet.setKeyChainGroupLookaheadSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wallet.setKeyChainGroupLookaheadSize()
方法的具体详情如下:
包路径:org.bitcoinj.wallet.Wallet
类名称:Wallet
方法名:setKeyChainGroupLookaheadSize
[英]See org.bitcoinj.wallet.DeterministicKeyChain#setLookaheadSize(int) for more info on this.
[中]见org。比特币。钱包DeterministicKeyChain#setLookaheadSize(int)了解更多信息。
代码示例来源:origin: HashEngineering/dashj
private static void addKey() {
// If we're being given precise details, we have to import the key.
if (options.has("privkey") || options.has("pubkey")) {
importKey();
} else {
if (options.has(lookaheadSize)) {
Integer size = options.valueOf(lookaheadSize);
log.info("Setting keychain lookahead size to {}", size);
wallet.setKeyChainGroupLookaheadSize(size);
}
ECKey key;
try {
key = wallet.freshReceiveKey();
} catch (DeterministicUpgradeRequiredException e) {
try {
KeyParameter aesKey = passwordToKey(false);
wallet.upgradeToDeterministic(aesKey);
} catch (DeterministicUpgradeRequiresPassword e2) {
System.err.println("This wallet must be upgraded to be deterministic, but it's encrypted: please supply the password and try again.");
return;
}
key = wallet.freshReceiveKey();
}
System.out.println(key.toAddress(params) + " " + key);
}
}
代码示例来源:origin: greenaddress/GreenBits
wallet.setKeyChainGroupLookaheadSize(4);
wallet.setKeyChainGroupLookaheadThreshold(2);
代码示例来源:origin: greenaddress/GreenBits
wallet.setKeyChainGroupLookaheadSize(5);
wallet.setKeyChainGroupLookaheadThreshold(4);
peerGroup.start();
内容来源于网络,如有侵权,请联系作者删除!