mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Revert "Periodservice cycles"
This commit is contained in:
parent
7cf9935f29
commit
89f3841cb2
@ -1,5 +1,12 @@
|
||||
language: java
|
||||
jdk: oraclejdk8
|
||||
before_cache:
|
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.gradle/caches/
|
||||
- $HOME/.gradle/wrapper/
|
||||
notifications:
|
||||
slack:
|
||||
on_success: change
|
||||
|
@ -141,13 +141,12 @@ public class ProposalDashboardView extends ActivatableView<GridPane, Void> {
|
||||
|
||||
private void onChainHeightChanged(int height) {
|
||||
phaseBarsItems.forEach(item -> {
|
||||
int startBlock = periodService.getFirstBlockOfPhase(periodService.getCycle(height), item.getPhase());
|
||||
int endBlock = periodService.getLastBlockOfPhase(periodService.getCycle(height), item.getPhase());
|
||||
int startBlock = periodService.getAbsoluteStartBlockOfPhase(height, item.getPhase());
|
||||
int endBlock = periodService.getAbsoluteEndBlockOfPhase(height, item.getPhase());
|
||||
item.setStartAndEnd(startBlock, endBlock);
|
||||
double progress = 0;
|
||||
if (height >= startBlock && height <= endBlock) {
|
||||
progress = (double) (height - startBlock + 1) /
|
||||
(double) periodService.getCycle(height).getPhaseDuration(item.getPhase());
|
||||
progress = (double) (height - startBlock + 1) / (double) item.getPhase().getDurationInBlocks();
|
||||
} else if (height < startBlock) {
|
||||
progress = 0;
|
||||
} else if (height > endBlock) {
|
||||
|
Loading…
Reference in New Issue
Block a user