@@ -8,21 +8,20 @@ let GObj = require("../");
8
8
const MS_PER_DAY = 24 * 60 * 60 * 1000 ;
9
9
10
10
function logEstimates ( estimates ) {
11
- console . log ( "Measured Seconds per Block" , estimates . secondsPerBlock ) ;
12
- console . log ( "" ) ;
11
+ console . log ( `Until next...` ) ;
12
+
13
+ let voteDeltaDays = estimates . voteDeltaMs / MS_PER_DAY ;
14
+ console . log ( ` Vote (${ estimates . voteHeight } ):` ) ;
15
+ console . log ( " Blocks:" , estimates . voteDelta ) ;
16
+ console . log ( " Days:" , voteDeltaDays ) ;
17
+ console . log ( " Date:" , estimates . voteIso ) ;
13
18
14
19
let superblockDeltaDays = estimates . superblockDeltaMs / MS_PER_DAY ;
15
- console . log ( `Until next Superblock (${ estimates . superblockHeight } ):` ) ;
20
+ console . log ( ` Superblock (${ estimates . superblockHeight } ):` ) ;
16
21
console . log ( " Blocks:" , estimates . superblockDelta ) ;
17
22
console . log ( " Days:" , superblockDeltaDays ) ;
18
23
console . log ( " Date:" , estimates . superblockIso ) ;
19
- console . log ( "" ) ;
20
24
21
- let voteDeltaDays = estimates . voteDeltaMs / MS_PER_DAY ;
22
- console . log ( `Until next Vote (${ estimates . voteHeight } ):` ) ;
23
- console . log ( " Blocks:" , estimates . voteDelta ) ;
24
- console . log ( " Days:" , voteDeltaDays ) ;
25
- console . log ( " Date:" , estimates . voteIso ) ;
26
25
console . log ( "" ) ;
27
26
}
28
27
@@ -33,8 +32,14 @@ function check2024Aug1() {
33
32
let currentBlockMs = new Date ( "2024-08-01 22:01:00" ) ;
34
33
35
34
let estimates = GObj . estimateFutureBlocks ( currentBlockMs , currentBlockHeight ) ;
36
- // TODO test outputs for rough legitimacy
37
- logEstimates ( estimates ) ;
35
+ console . log ( "Measured Seconds per Block" , estimates [ 0 ] . secondsPerBlock ) ;
36
+ console . log ( "" ) ;
37
+ console . log ( estimates ) ;
38
+
39
+ for ( let estimate of estimates ) {
40
+ // TODO test outputs for rough legitimacy
41
+ logEstimates ( estimate ) ;
42
+ }
38
43
}
39
44
40
45
check2024Aug1 ( ) ;
0 commit comments