/** * Sets the lookahead buffer threshold for ALL deterministic key chains, see * {@link DeterministicKeyChain#setLookaheadThreshold(int)} * for more information. */ public void setLookaheadThreshold(int num) { for (DeterministicKeyChain chain : chains) { chain.setLookaheadThreshold(num); } }
/** * Sets the lookahead buffer threshold for ALL deterministic key chains, see * {@link DeterministicKeyChain#setLookaheadThreshold(int)} * for more information. */ public void setLookaheadThreshold(int num) { for (DeterministicKeyChain chain : chains) { chain.setLookaheadThreshold(num); } }
/** * Sets the lookahead buffer threshold for ALL deterministic key chains, see * {@link DeterministicKeyChain#setLookaheadThreshold(int)} * for more information. */ public void setLookaheadThreshold(int num) { for (DeterministicKeyChain chain : chains) { chain.setLookaheadThreshold(num); } }
/** * Sets the lookahead buffer threshold for ALL deterministic key chains, see * {@link DeterministicKeyChain#setLookaheadThreshold(int)} * for more information. */ public void setLookaheadThreshold(int num) { for (DeterministicKeyChain chain : chains) { chain.setLookaheadThreshold(num); } }
private void addFollowingAccountKeys(List<DeterministicKey> followingAccountKeys, int sigsRequiredToSpend) { checkArgument(sigsRequiredToSpend <= followingAccountKeys.size() + 1, "Multisig threshold can't exceed total number of keys"); checkState(numLeafKeysIssued() == 0, "Active keychain already has keys in use"); checkState(followingKeyChains == null); List<DeterministicKeyChain> followingKeyChains = Lists.newArrayList(); for (DeterministicKey key : followingAccountKeys) { checkArgument(key.getPath().size() == getAccountPath().size(), "Following keys have to be account keys"); DeterministicKeyChain chain = DeterministicKeyChain.watchAndFollow(key); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); followingKeyChains.add(chain); } this.sigsRequiredToSpend = sigsRequiredToSpend; this.followingKeyChains = followingKeyChains; }
/** * Adds an HD chain to the chains list, and make it the default chain (from which keys are issued). * Useful for adding a complex pre-configured keychain, such as a married wallet. */ public void addAndActivateHDChain(DeterministicKeyChain chain) { log.info("Creating and activating a new HD chain: {}", chain); for (ListenerRegistration<KeyChainEventListener> registration : basic.getListeners()) chain.addEventListener(registration.listener, registration.executor); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); chains.add(chain); }
private void addFollowingAccountKeys(List<DeterministicKey> followingAccountKeys, int sigsRequiredToSpend) { checkArgument(sigsRequiredToSpend <= followingAccountKeys.size() + 1, "Multisig threshold can't exceed total number of keys"); checkState(numLeafKeysIssued() == 0, "Active keychain already has keys in use"); checkState(followingKeyChains == null); List<DeterministicKeyChain> followingKeyChains = Lists.newArrayList(); for (DeterministicKey key : followingAccountKeys) { checkArgument(key.getPath().size() == getAccountPath().size(), "Following keys have to be account keys"); DeterministicKeyChain chain = DeterministicKeyChain.watchAndFollow(key); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); followingKeyChains.add(chain); } this.sigsRequiredToSpend = sigsRequiredToSpend; this.followingKeyChains = followingKeyChains; }
private void addFollowingAccountKeys(List<DeterministicKey> followingAccountKeys, int sigsRequiredToSpend) { checkArgument(sigsRequiredToSpend <= followingAccountKeys.size() + 1, "Multisig threshold can't exceed total number of keys"); checkState(numLeafKeysIssued() == 0, "Active keychain already has keys in use"); checkState(followingKeyChains == null); List<DeterministicKeyChain> followingKeyChains = Lists.newArrayList(); for (DeterministicKey key : followingAccountKeys) { checkArgument(key.getPath().size() == getAccountPath().size(), "Following keys have to be account keys"); DeterministicKeyChain chain = DeterministicKeyChain.watchAndFollow(key); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); followingKeyChains.add(chain); } this.sigsRequiredToSpend = sigsRequiredToSpend; this.followingKeyChains = followingKeyChains; }
/** * Adds an HD chain to the chains list, and make it the default chain (from which keys are issued). * Useful for adding a complex pre-configured keychain, such as a married wallet. */ public void addAndActivateHDChain(DeterministicKeyChain chain) { log.info("Creating and activating a new HD chain: {}", chain); for (ListenerRegistration<KeyChainEventListener> registration : basic.getListeners()) chain.addEventListener(registration.listener, registration.executor); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); chains.add(chain); }
private void addFollowingAccountKeys(List<DeterministicKey> followingAccountKeys, int sigsRequiredToSpend) { checkArgument(sigsRequiredToSpend <= followingAccountKeys.size() + 1, "Multisig threshold can't exceed total number of keys"); checkState(numLeafKeysIssued() == 0, "Active keychain already has keys in use"); checkState(followingKeyChains == null); List<DeterministicKeyChain> followingKeyChains = Lists.newArrayList(); for (DeterministicKey key : followingAccountKeys) { checkArgument(key.getPath().size() == getAccountPath().size(), "Following keys have to be account keys"); DeterministicKeyChain chain = DeterministicKeyChain.watchAndFollow(key); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); followingKeyChains.add(chain); } this.sigsRequiredToSpend = sigsRequiredToSpend; this.followingKeyChains = followingKeyChains; }
/** * Adds an HD chain to the chains list, and make it the default chain (from which keys are issued). * Useful for adding a complex pre-configured keychain, such as a married wallet. */ public void addAndActivateHDChain(DeterministicKeyChain chain) { log.info("Creating and activating a new HD chain: {}", chain); for (ListenerRegistration<KeyChainEventListener> registration : basic.getListeners()) chain.addEventListener(registration.listener, registration.executor); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); chains.add(chain); }
/** * Adds an HD chain to the chains list, and make it the default chain (from which keys are issued). * Useful for adding a complex pre-configured keychain, such as a married wallet. */ public void addAndActivateHDChain(DeterministicKeyChain chain) { log.info("Creating and activating a new HD chain: {}", chain); for (ListenerRegistration<KeyChainEventListener> registration : basic.getListeners()) chain.addEventListener(registration.listener, registration.executor); if (lookaheadSize >= 0) chain.setLookaheadSize(lookaheadSize); if (lookaheadThreshold >= 0) chain.setLookaheadThreshold(lookaheadThreshold); chains.add(chain); }