Fix onParseBlockChainComplete handler

We had 2 times the onParseTxsComplete called in the version before
This commit is contained in:
Manfred Karrer 2019-02-06 00:26:11 +01:00
parent df685ceb55
commit 4868b0e5df
No known key found for this signature in database
GPG key ID: 401250966A6B2C46

View file

@ -220,8 +220,9 @@ public class DaoStateService implements DaoSetupService {
public void onParseBlockChainComplete() { public void onParseBlockChainComplete() {
parseBlockChainComplete = true; parseBlockChainComplete = true;
// Now we need to trigger the onParseBlockComplete to update the state in the app getLastBlock().ifPresent(block -> {
getLastBlock().ifPresent(this::onParseBlockComplete); daoStateListeners.forEach(l -> l.onParseTxsCompleteAfterBatchProcessing(block));
});
daoStateListeners.forEach(DaoStateListener::onParseBlockChainComplete); daoStateListeners.forEach(DaoStateListener::onParseBlockChainComplete);
} }