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

refactor: revert x/liquidfarming and add x/liquidamm #171

Merged
merged 18 commits into from
Aug 8, 2023

Conversation

kingcre
Copy link
Contributor

@kingcre kingcre commented Aug 1, 2023

Description

This PR reverts the modifications in the x/liquidfarming and creates a separate x/liquidamm module.

NOTE: merge this PR after merging #168

References

x/liquidamm/abci.go Dismissed Show dismissed Hide dismissed
}
t, err := sdk.ParseTimeBytes(bz)
if err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)

y, m, d := ctx.BlockTime().Date()
endTime, found := k.GetNextRewardsAuctionEndTime(ctx)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
nextEndTime = time.Date(y, m, d+1, 0, 0, 0, 0, time.UTC) // the next day 00:00 UTC
}
if err := k.AdvanceRewardsAuctions(ctx, nextEndTime); err != nil {
panic(err)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call

// BeginBlock executes all ABCI BeginBlock logic respective to the module.
func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
BeginBlocker(ctx, am.keeper)

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods Warning

path flow from Begin/EndBlock to a panic call
path flow from Begin/EndBlock to a panic call
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@kingcre kingcre marked this pull request as ready for review August 7, 2023 09:25
@kingcre kingcre merged commit b8307eb into amm-module Aug 8, 2023
17 checks passed
@kingcre kingcre deleted the liquidamm-module branch August 22, 2023 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants