Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ Disable total supply reset function temporary #270

Merged
merged 1 commit into from
May 24, 2023
Merged
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
18 changes: 8 additions & 10 deletions x/pot/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
abci "github.com/tendermint/tendermint/abci/types"

sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/stratosnet/stratos-chain/x/pot/keeper"
"github.com/stratosnet/stratos-chain/x/pot/types"
)
Expand Down Expand Up @@ -55,14 +53,14 @@ func EndBlocker(ctx sdk.Context, req abci.RequestEndBlock, k keeper.Keeper) []ab
}

// reset total supply to 100M stos
minter, amount := k.RestoreTotalSupply(ctx)
if minter.Empty() || amount.Empty() {
return []abci.ValidatorUpdate{}
}

ctx.EventManager().EmitEvent(
banktypes.NewCoinMintEvent(minter, amount),
)
//minter, amount := k.RestoreTotalSupply(ctx)
//if minter.Empty() || amount.Empty() {
// return []abci.ValidatorUpdate{}
//}
//
//ctx.EventManager().EmitEvent(
// banktypes.NewCoinMintEvent(minter, amount),
//)

return []abci.ValidatorUpdate{}
}