@Override public List<UTXO> getOpenTransactionOutputs(List<Address> addresses) throws UTXOProviderException { // This is *NOT* optimal: We go through all the outputs and select the ones we are looking for. // If someone uses this store for production then they have a lot more to worry about than an inefficient impl :) List<UTXO> foundOutputs = new ArrayList<UTXO>(); List<UTXO> outputsList = transactionOutputMap.values(); for (UTXO output : outputsList) { for (Address address : addresses) { if (output.getAddress().equals(address.toString())) { foundOutputs.add(output); } } } return foundOutputs; } }
@Override public List<UTXO> getOpenTransactionOutputs(List<Address> addresses) throws UTXOProviderException { // This is *NOT* optimal: We go through all the outputs and select the ones we are looking for. // If someone uses this store for production then they have a lot more to worry about than an inefficient impl :) List<UTXO> foundOutputs = new ArrayList<>(); List<UTXO> outputsList = transactionOutputMap.values(); for (UTXO output : outputsList) { for (Address address : addresses) { if (output.getAddress().equals(address.toString())) { foundOutputs.add(output); } } } return foundOutputs; } }
@Override public List<UTXO> getOpenTransactionOutputs(List<Address> addresses) throws UTXOProviderException { // This is *NOT* optimal: We go through all the outputs and select the ones we are looking for. // If someone uses this store for production then they have a lot more to worry about than an inefficient impl :) List<UTXO> foundOutputs = new ArrayList<UTXO>(); List<UTXO> outputsList = transactionOutputMap.values(); for (UTXO output : outputsList) { for (Address address : addresses) { if (output.getAddress().equals(address.toString())) { foundOutputs.add(output); } } } return foundOutputs; } }
@Override public List<UTXO> getOpenTransactionOutputs(List<Address> addresses) throws UTXOProviderException { // This is *NOT* optimal: We go through all the outputs and select the ones we are looking for. // If someone uses this store for production then they have a lot more to worry about than an inefficient impl :) List<UTXO> foundOutputs = new ArrayList<>(); List<UTXO> outputsList = transactionOutputMap.values(); for (UTXO output : outputsList) { for (Address address : addresses) { if (output.getAddress().equals(address.toString())) { foundOutputs.add(output); } } } return foundOutputs; } }