Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

Fix: Fixes regression introduced through the bundle validator refactor #1588

Merged
merged 2 commits into from
Sep 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -205,20 +205,16 @@ public Map<Hash, Long> generateBalanceDiff(Set<Hash> 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;
}
}

Expand Down