diff --git a/src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java b/src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java index a034e30d4e..aa0e773502 100644 --- a/src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java +++ b/src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java @@ -205,20 +205,16 @@ public Map generateBalanceDiff(Set visitedTransactions, Hash s break; } - if (bundleTransactions.get(0).getHash().equals(transactionViewModel.getHash())) { - for (final TransactionViewModel bundleTransactionViewModel : bundleTransactions) { + for (final TransactionViewModel bundleTransactionViewModel : bundleTransactions) { - if (bundleTransactionViewModel.value() != 0 && countedTx.add(bundleTransactionViewModel.getHash())) { + if (bundleTransactionViewModel.value() != 0 && countedTx.add(bundleTransactionViewModel.getHash())) { - final Hash address = bundleTransactionViewModel.getAddressHash(); - final Long value = state.get(address); - state.put(address, value == null ? bundleTransactionViewModel.value() - : Math.addExact(value, bundleTransactionViewModel.value())); - } + final Hash address = bundleTransactionViewModel.getAddressHash(); + final Long value = state.get(address); + state.put(address, value == null ? bundleTransactionViewModel.value() + : Math.addExact(value, bundleTransactionViewModel.value())); } - - break; } }