Circulating Supply code
This commit is contained in:
parent
5502374d9b
commit
1da68228ca
@ -88,7 +88,7 @@ const getTotalRewardByHeight= async(height) => {
|
|||||||
currentReward = 8;
|
currentReward = 8;
|
||||||
} else if (height <= BLOCK_ERA_3) {
|
} else if (height <= BLOCK_ERA_3) {
|
||||||
remaining_height = height - BLOCK_ERA_2;
|
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;
|
currentReward = 4;
|
||||||
} else if (height <= BLOCK_ERA_4) {
|
} else if (height <= BLOCK_ERA_4) {
|
||||||
remaining_height = height - BLOCK_ERA_3;
|
remaining_height = height - BLOCK_ERA_3;
|
||||||
@ -296,7 +296,7 @@ const latestBlockDetails = async()=> {
|
|||||||
currentReward = 8;
|
currentReward = 8;
|
||||||
} else if (height <= BLOCK_ERA_3) {
|
} else if (height <= BLOCK_ERA_3) {
|
||||||
remaining_height = height - BLOCK_ERA_2;
|
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;
|
currentReward = 4;
|
||||||
} else if (height <= BLOCK_ERA_4) {
|
} else if (height <= BLOCK_ERA_4) {
|
||||||
remaining_height = height - BLOCK_ERA_3;
|
remaining_height = height - BLOCK_ERA_3;
|
||||||
@ -512,7 +512,7 @@ const previousBlockDetails = async() => {
|
|||||||
currentReward = 8;
|
currentReward = 8;
|
||||||
} else if (height <= BLOCK_ERA_3) {
|
} else if (height <= BLOCK_ERA_3) {
|
||||||
remaining_height = height - BLOCK_ERA_2;
|
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;
|
currentReward = 4;
|
||||||
} else if (height <= BLOCK_ERA_4) {
|
} else if (height <= BLOCK_ERA_4) {
|
||||||
remaining_height = height - BLOCK_ERA_3;
|
remaining_height = height - BLOCK_ERA_3;
|
||||||
|
Loading…
Reference in New Issue
Block a user