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; }
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; }