-
Notifications
You must be signed in to change notification settings - Fork 45
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
Intitial commit of Block Interval Auctions #242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit, seems good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One bug and some questions
|
||
} | ||
|
||
func (suite *KeeperTestSuite) TestAuctionBeginWithInSufficientFunds() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I understand what this is testing. Does the module account implicitly have a zero balance? Why is BeginAuction being called if that's the case?
expectedEmission := sdk.NewCoin(appParams.BaseCoinUnit, event.Amount) | ||
suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(ctx, gomock.Any(), gomock.Any(), sdk.NewCoins(expectedEmission)).Times(1) | ||
suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) | ||
suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it not get to these calls (inside of k.beginAuction) if the height modulo isn't zero (which i thought is what the test name implies)?
cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" | ||
) | ||
|
||
func (suite *KeeperTestSuite) TestBeginBlockerZeroRewardsBalance() { | ||
ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to add the same fee accrual initialization here, the test panics
Initial commit of Cellar Interval Auctions