Rename onChangeAfterBatchProcessing to onDaoStateHashesChanged

at DaoStateMonitoringService.Listener
This commit is contained in:
chimp1984 2021-10-26 13:50:42 +02:00
parent 3ac61c59f1
commit cd3e8217ae
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
3 changed files with 6 additions and 6 deletions

View file

@ -88,7 +88,7 @@ public class DaoStateMonitoringService implements DaoSetupService, DaoStateListe
DaoStateNetworkService.Listener<NewDaoStateHashMessage, GetDaoStateHashesRequest, DaoStateHash> {
public interface Listener {
void onChangeAfterBatchProcessing();
void onDaoStateHashesChanged();
void onCheckpointFail();
}
@ -235,7 +235,7 @@ public class DaoStateMonitoringService implements DaoSetupService, DaoStateListe
});
if (hasChanged.get()) {
listeners.forEach(Listener::onChangeAfterBatchProcessing);
listeners.forEach(Listener::onDaoStateHashesChanged);
}
}
@ -318,7 +318,7 @@ public class DaoStateMonitoringService implements DaoSetupService, DaoStateListe
// We only broadcast after parsing of blockchain is complete
if (parseBlockChainComplete) {
// We notify listeners only after batch processing to avoid performance issues at UI code
listeners.forEach(Listener::onChangeAfterBatchProcessing);
listeners.forEach(Listener::onDaoStateHashesChanged);
// We delay broadcast to give peers enough time to have received the block.
// Otherwise they would ignore our data if received block is in future to their local blockchain.
@ -379,7 +379,7 @@ public class DaoStateMonitoringService implements DaoSetupService, DaoStateListe
}
if (notifyListeners && changed.get()) {
listeners.forEach(Listener::onChangeAfterBatchProcessing);
listeners.forEach(Listener::onDaoStateHashesChanged);
}
GcUtil.maybeReleaseMemory();

View file

@ -416,7 +416,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel>
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public void onChangeAfterBatchProcessing() {
public void onDaoStateHashesChanged() {
}
@Override

View file

@ -111,7 +111,7 @@ public class DaoStateMonitorView extends StateMonitorView<DaoStateHash, DaoState
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public void onChangeAfterBatchProcessing() {
public void onDaoStateHashesChanged() {
if (daoStateService.isParseBlockChainComplete()) {
onDataUpdate();
}