mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Refactor: Extract statement to var and return early
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
318803e4d9
commit
143d1e9cc6
@ -220,7 +220,11 @@ public class DaoStateSnapshotService implements DaoSetupService, DaoStateListene
|
||||
|
||||
// Either we don't have a snapshot candidate yet, or if we have one the height at that snapshot candidate must be
|
||||
// different to our current height.
|
||||
if (daoStateCandidate == null || snapshotHeight != chainHeight) {
|
||||
boolean noSnapshotCandidateOrDifferentHeight = daoStateCandidate == null || snapshotHeight != chainHeight;
|
||||
if (!noSnapshotCandidateOrDifferentHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We protect to get called while we are not completed with persisting the daoState. This can take about
|
||||
// 20 seconds, and it is not expected that we get triggered another snapshot event in that period, but this
|
||||
// check guards that we would skip such calls.
|
||||
@ -244,7 +248,6 @@ public class DaoStateSnapshotService implements DaoSetupService, DaoStateListene
|
||||
createSnapshot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void persist() {
|
||||
long ts = System.currentTimeMillis();
|
||||
|
Loading…
Reference in New Issue
Block a user