cli
cli copied to clipboard
There seems to be a little bug in the documentation of ignite create blog comment
at https://docs.ignite.com/guide/blog/comment-blog.html
After create first post ,the post.id=0 ,
because
...
bz := store.Get(byteKey)
// Return zero if the count value is not found (for example, it's the first post)
if bz == nil {
return 0
}
...
at function AppendPost
then create first comment in the document:
blogd tx blog create-comment 0 Uno "This is the first comment" --from alice
always return error
because at the function CreateComment
...
// Check if the Post Exists for which a comment is being created
if msg.PostID == 0 {
return nil, sdkerrors.Wrapf(types.ErrID, "Post Blog Id does not exist for which comment with Blog Id %d was made", msg.PostID)
}
...