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
Various improvements #37
Conversation
… riccardo/module-separation
- Improved the posts events - Replaced all the time.Time instances with block heights (works towards #23)
- Replaced the creation time with block height
Codecov Report
@@ Coverage Diff @@
## develop #37 +/- ##
============================================
+ Coverage 41.64% 61.18% +19.54%
============================================
Files 4 13 +9
Lines 341 541 +200
============================================
+ Hits 142 331 +189
+ Misses 199 192 -7
- Partials 0 18 +18
Continue to review full report at Codecov.
|
Expiry: msg.Created.Add(time.Minute * 14400), | ||
SessionID: keeper.GetLastSessionID(ctx).Next(), | ||
Created: ctx.BlockHeight(), | ||
Expiry: ctx.BlockHeight() + 240, // 24 hours, counting a 6 secs block interval |
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.
Nice one! May put this in genesis params later.
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.
Opened #38 to have a better discussion there.
x/posts/internal/keeper/handler.go
Outdated
case types.MsgLikePost: | ||
return handleMsgLike(ctx, keeper, msg) | ||
default: | ||
errMsg := fmt.Sprintf("Unrecognized Magpie Msg type: %v", msg.Type()) |
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.
This error message should be updated.
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.
Done
x/magpie/internal/keeper/querier.go
Outdated
abci "github.com/tendermint/tendermint/abci/types" | ||
) | ||
|
||
// query endpoints supported by the magpie Querier | ||
const ( | ||
QueryPost = "post" | ||
QueryLike = "like" | ||
QuerySession = "testSession" |
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.
It looks this would give error when query sessions/
endpoint.
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.
Fixed, thanks
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.
Some minor change request and questions. Tested the commands locally.
Description
magpie
module intomagpie
andposts
(closes Split the magpie module #26)Checklist
Files changed
in the Github PR explorer