@Override public void onTransactionHistory(AddressStatus status, List<ServerClient.HistoryTx> historyTxes) { log.info("onTransactionHistory"); lock.lock(); try { //AddressStatus updatingStatus = statusPendingUpdates.get(status.getAddress()); // Check if this updating status is valid status.queueHistoryTransactions(historyTxes); log.info("Fetching txs"); fetchTransactions(historyTxes); queueOnNewBalance(); //tryToApplyState(updatingStatus); } finally { lock.unlock(); } }
@Override public void onTransactionHistory(AddressStatus status, List<HistoryTx> historyTxes) { lock.lock(); try { AddressStatus updatingStatus = statusPendingUpdates.get(status.getAddress()); // Check if this updating status is valid if (updatingStatus != null && updatingStatus.equals(status)) { updatingStatus.queueHistoryTransactions(historyTxes); fetchTransactionsIfNeeded(historyTxes); tryToApplyState(); } else { log.info("Ignoring history tx call because no entry found or newer entry."); } } finally { lock.unlock(); } }