Skip to content

Commit

Permalink
test this
Browse files Browse the repository at this point in the history
  • Loading branch information
okdas committed Oct 17, 2024
1 parent 9ea529a commit 9c3e66a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions x/tokenomics/keeper/token_logic_modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,11 +661,12 @@ func calculateGlobalPerClaimMintInflationFromSettlementAmount(settlementCoin sdk
// TODO_MAINNET: Consider using fixed point arithmetic for deterministic results.
settlementAmtFloat := new(big.Float).SetUint64(settlementCoin.Amount.Uint64())
newMintAmtFloat := new(big.Float).Mul(settlementAmtFloat, big.NewFloat(MintPerClaimedTokenGlobalInflation))
// DEV_NOTE: If new mint is less than 1 and more than 0, ceil it to 1 so that
// we never expect to process a claim with 0 minted tokens.
if newMintAmtFloat.Cmp(big.NewFloat(1)) < 0 && newMintAmtFloat.Cmp(big.NewFloat(0)) > 0 {
newMintAmtFloat = big.NewFloat(1)
}
// See if this triggers consensuswarn
// // DEV_NOTE: If new mint is less than 1 and more than 0, ceil it to 1 so that
// // we never expect to process a claim with 0 minted tokens.
// if newMintAmtFloat.Cmp(big.NewFloat(1)) < 0 && newMintAmtFloat.Cmp(big.NewFloat(0)) > 0 {
// newMintAmtFloat = big.NewFloat(1)
// }
newMintAmtInt, _ := newMintAmtFloat.Int64()
mintAmtCoin := cosmostypes.NewCoin(volatile.DenomuPOKT, math.NewInt(newMintAmtInt))
return mintAmtCoin, *newMintAmtFloat
Expand Down

0 comments on commit 9c3e66a

Please sign in to comment.