Skip to content

Commit

Permalink
Deduct fixed reserves to pay tx fees for MRL coins.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolin1579 committed Sep 16, 2024
1 parent c840696 commit 23974ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Miningcore/Blockchain/Cryptonote/CryptonoteConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public static class CryptonoteConstants
public static class MoreloConstants
{
public const decimal MoreloReserveRewardInitial = 5.555m; // MiningReward = BlockReward - ReserveReward
public const decimal MoreloStaticTransactionFeeReserve = 1.0m; // Deduct static reserve for tx fees

}

public static class EquilibriaConstants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,10 @@ public override async Task<decimal> UpdateBlockRewardBalancesAsync(IDbConnection
var blockRewardRemaining = await base.UpdateBlockRewardBalancesAsync(con, tx, pool, block, ct);

// Deduct static reserve for tx fees
blockRewardRemaining -= CryptonoteConstants.StaticTransactionFeeReserve;
var coin = poolConfig.Template.As<CryptonoteCoinTemplate>();
var StaticTransactionFeeReserve = (coin.Symbol == "MRL") ? MoreloConstants.MoreloStaticTransactionFeeReserve : CryptonoteConstants.StaticTransactionFeeReserve;

blockRewardRemaining -= StaticTransactionFeeReserve;

return blockRewardRemaining;
}
Expand Down

0 comments on commit 23974ff

Please sign in to comment.