Update current supply calculation.

This commit is contained in:
Dan Miller 2022-12-27 16:22:25 -08:00
parent 3fb35b3f3b
commit 21cf16259a
Signed by: dan
GPG Key ID: 3E62752FA78A3D06

View File

@ -88,7 +88,7 @@ const getTotalRewardByHeight= async(height) => {
currentReward = 8;
} else if (height <= BLOCK_ERA_3) {
remaining_height = height - BLOCK_ERA_2;
coin_existence = (16 * BLOCK_ERA_1) + (8 * BLOCK_ERA_2) + 4 * remaining_height;
coin_existence = (16 * BLOCK_ERA_1) + (8 * (BLOCK_ERA_2 - BLOCK_ERA_1 )) + 4 * remaining_height;
currentReward = 4;
} else if (height <= BLOCK_ERA_4) {
remaining_height = height - BLOCK_ERA_3;
@ -362,7 +362,7 @@ let currentReward = 16;
currentReward = 8;
} else if (height <= BLOCK_ERA_3) {
remaining_height = height - BLOCK_ERA_2;
coin_existence = (16 * BLOCK_ERA_1) + (8 * BLOCK_ERA_2) + 4 * remaining_height;
coin_existence = (16 * BLOCK_ERA_1) + (8 * (BLOCK_ERA_2 - BLOCK_ERA_1 )) + 4 * remaining_height;
currentReward = 4;
} else if (height <= BLOCK_ERA_4) {
remaining_height = height - BLOCK_ERA_3;