/** * Get all the {@link UTXO}'s from the {@link UTXOProvider} based on keys that the * wallet contains. * @return The list of stored outputs. */ protected List<UTXO> getStoredOutputsFromUTXOProvider() throws UTXOProviderException { UTXOProvider utxoProvider = checkNotNull(vUTXOProvider, "No UTXO provider has been set"); List<UTXO> candidates = new ArrayList<>(); List<ECKey> keys = getImportedKeys(); keys.addAll(getActiveKeyChain().getLeafKeys()); List<Address> addresses = new ArrayList<>(); for (ECKey key : keys) { Address address = new Address(params, key.getPubKeyHash()); addresses.add(address); } candidates.addAll(utxoProvider.getOpenTransactionOutputs(addresses)); return candidates; }
@Override public int getChainHeadHeight() throws UTXOProviderException { try { return getVerifiedChainHead().getHeight(); } catch (BlockStoreException e) { throw new UTXOProviderException(e); } }
/** * Get all the {@link UTXO}'s from the {@link UTXOProvider} based on keys that the * wallet contains. * @return The list of stored outputs. */ protected List<UTXO> getStoredOutputsFromUTXOProvider() throws UTXOProviderException { UTXOProvider utxoProvider = checkNotNull(vUTXOProvider, "No UTXO provider has been set"); List<UTXO> candidates = new ArrayList<UTXO>(); List<ECKey> keys = getImportedKeys(); keys.addAll(getActiveKeyChain().getLeafKeys()); List<Address> addresses = new ArrayList<Address>(); for (ECKey key : keys) { Address address = new Address(params, key.getPubKeyHash()); addresses.add(address); } candidates.addAll(utxoProvider.getOpenTransactionOutputs(addresses)); return candidates; }