fix utxo account balance wrong bug
@@ -77,8 +77,9 @@ public class UtxoAccountsServiceImpl implements UtxoAccountsService {
List<Transaction> txs = block.getTxs();
int txIndex = 0;
for (Transaction tx : txs) {
+ try {
if (tx.getCoinData() == null) {
- return true;
+ continue;
}
List<Coin> from = tx.getCoinData().getFrom();
List<Coin> to = tx.getCoinData().getTo();
@@ -99,6 +100,9 @@ public class UtxoAccountsServiceImpl implements UtxoAccountsService {
// buildContractTranfersBalance(utxoAccountsMap, transferList, block.getHeader().getHeight(), txIndex);
// }
txIndex++;
+ } catch (Exception e) {
+ Log.error(e);
+ }
}
return true;
}
