Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions server/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const getTotalRewardByHeight= async(height) => {
currentReward = 2;
} else if (height <= BLOCK_ERA_5) {
remaining_height = height - BLOCK_ERA_4;
coin_existence = (16 * BLOCK_ERA_1) + (8 * BLOCK_ERA_2) + (4 * BLOCK_ERA_3) + (2 * BLOCK_ERA_4) +1 * remaining_height;
coin_existence = (16 * BLOCK_ERA_1) + (8 * (BLOCK_ERA_2 - BLOCK_ERA_1)) + (4 * (BLOCK_ERA_3 - BLOCK_ERA_2)) + (2 * (BLOCK_ERA_4 - BLOCK_ERA_3)) + 1 * remaining_height;
currentReward = 1;
} else {
// After the era 6, we reduce the block rewards by half each 1460 days.
Expand Down Expand Up @@ -306,7 +306,7 @@ const latestBlockDetails = async()=> {
currentReward = 2;
} else if (height <= BLOCK_ERA_5) {
remaining_height = height - BLOCK_ERA_4;
coin_existence = (16 * BLOCK_ERA_1) + (8 * BLOCK_ERA_2) + (4 * BLOCK_ERA_3) + (2 * BLOCK_ERA_4) +1 * remaining_height;
coin_existence = (16 * BLOCK_ERA_1) + (8 * (BLOCK_ERA_2 - BLOCK_ERA_1)) + (4 * (BLOCK_ERA_3 - BLOCK_ERA_2)) + (2 * (BLOCK_ERA_4 - BLOCK_ERA_3)) + 1 * remaining_height;
currentReward = 1;
} else {
// After the era 6, we reduce the block rewards by half each 1460 days.
Expand Down Expand Up @@ -523,7 +523,7 @@ const previousBlockDetails = async() => {
currentReward = 2;
} else if (height <= BLOCK_ERA_5) {
remaining_height = height - BLOCK_ERA_4;
coin_existence = (16 * BLOCK_ERA_1) + (8 * BLOCK_ERA_2) + (4 * BLOCK_ERA_3) + (2 * BLOCK_ERA_4) +1 * remaining_height;
coin_existence = (16 * BLOCK_ERA_1) + (8 * (BLOCK_ERA_2 - BLOCK_ERA_1)) + (4 * (BLOCK_ERA_3 - BLOCK_ERA_2)) + (2 * (BLOCK_ERA_4 - BLOCK_ERA_3)) + 1 * remaining_height;
currentReward = 1;
} else {
// After the era 6, we reduce the block rewards by half each 1460 days.
Expand Down