Repository: desmos-labs/desmos
Pull request #888 (2022-06-02 22:46:22)

chore: fix failing posts test
Closes: #XXXX

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

codecov[bot]: # [Codecov](https://codecov.io/gh/desmos-labs/desmos/pull/888?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs) Report
> Merging [#888](https://codecov.io/gh/desmos-labs/desmos/pull/888?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs) (54d01a8) into [master](https://codecov.io/gh/desmos-labs/desmos/commit/d9a708de7aa7da3bbfe35a845835ddd59cec5cd7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs) (d9a708d) will **decrease** coverage by `0.04%`.
> The diff coverage is `45.45%`.

```diff
@@            Coverage Diff             @@
##           master     #888      +/-   ##
==========================================
- Coverage   82.74%   82.69%   -0.05%     
==========================================
  Files         114      114              
  Lines       10217    10224       +7     
==========================================
+ Hits         8454     8455       +1     
- Misses       1432     1436       +4     
- Partials      331      333       +2     
```


| [Impacted Files](https://codecov.io/gh/desmos-labs/desmos/pull/888?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs) | Coverage Δ | |
|---|---|---|
| [x/posts/types/models.go](https://codecov.io/gh/desmos-labs/desmos/pull/888/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs#diff-eC9wb3N0cy90eXBlcy9tb2RlbHMuZ28=) | `71.03% <40.00%> (-1.01%)` | :arrow_down: |
| [x/posts/keeper/posts.go](https://codecov.io/gh/desmos-labs/desmos/pull/888/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs#diff-eC9wb3N0cy9rZWVwZXIvcG9zdHMuZ28=) | `91.12% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/desmos-labs/desmos/pull/888?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/desmos-labs/desmos/pull/888?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs). Last update [732b43d...54d01a8](https://codecov.io/gh/desmos-labs/desmos/pull/888?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=desmos-labs).


Patch:
diff --git a/x/posts/types/models.pb.go b/x/posts/types/models.pb.go
index 7db4b0fd..d7d27e49 100644
--- a/x/posts/types/models.pb.go
+++ b/x/posts/types/models.pb.go
@@ -74,26 +74,26 @@ type PostReference_Type int32
 const (
 	// No reference specified
 	TYPE_UNSPECIFIED PostReference_Type = 0
-	// This post is a reply to the referenced post
-	TYPE_REPLIED_TO PostReference_Type = 1
-	// This post is a quote to the referenced post
-	TYPE_QUOTED PostReference_Type = 2
-	// This post is a report of the referenced post
-	TYPE_REPOSTED PostReference_Type = 3
+	// This reference represents a reply to the specified post
+	TYPE_REPLY_TO PostReference_Type = 1
+	// This reference represents a quote of the specified post
+	TYPE_QUOTE PostReference_Type = 2
+	// This reference represents a repost of the specified post
+	TYPE_REPOST PostReference_Type = 3
 )
 
 var PostReference_Type_name = map[int32]string{
 	0: "TYPE_UNSPECIFIED",
-	1: "TYPE_REPLIED_TO",
-	2: "TYPE_QUOTED",
-	3: "TYPE_REPOSTED",
+	1: "TYPE_REPLY_TO",
+	2: "TYPE_QUOTE",
+	3: "TYPE_REPOST",
 }
 
 var PostReference_Type_value = map[string]int32{
 	"TYPE_UNSPECIFIED": 0,
-	"TYPE_REPLIED_TO":  1,
-	"TYPE_QUOTED":      2,
-	"TYPE_REPOSTED":    3,
+	"TYPE_REPLY_TO":    1,
+	"TYPE_QUOTE":       2,
+	"TYPE_REPOST":      3,
 }
 
 func (x PostReference_Type) String() string {
@@ -255,6 +255,9 @@ type PostReference struct {
 	Type PostReference_Type `protobuf:"varint,1,opt,name=type,proto3,enum=desmos.posts.v1.PostReference_Type" json:"type,omitempty"`
 	// Id of the referenced post
 	PostID uint64 `protobuf:"varint,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"`
+	// Position of the reference inside the post's text. This should be used only
+	// with the type set to TYPE_QUOTE
+	Position uint64 `protobuf:"varint,3,opt,name=position,proto3" json:"position,omitempty"`
 }
 
 func (m *PostReference) Reset()         { *m = PostReference{} }
@@ -304,6 +307,13 @@ func (m *PostReference) GetPostID() uint64 {
 	return 0
 }
 
+func (m *PostReference) GetPosition() uint64 {
+	if m != nil {
+		return m.Position
+	}
+	return 0
+}
+
 // Contains the details of entities parsed out of the post text
 type Entities struct {
 	Hashtags []Tag `protobuf:"bytes,1,rep,name=hashtags,proto3" json:"hashtags"`
@@ -1043,89 +1053,89 @@ func init() {
 func init() { proto.RegisterFile("desmos/posts/v1/models.proto", fileDescriptor_9cb993d391569998) }
 
 var fileDescriptor_9cb993d391569998 = []byte{
-	// 1297 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
-	0x14, 0xcf, 0xda, 0x8e, 0x63, 0x3f, 0xc7, 0x7f, 0x3a, 0x0d, 0xad, 0xeb, 0x52, 0x3b, 0x6d, 0x11,
-	0x58, 0x08, 0xd6, 0x6a, 0x2a, 0x8a, 0x54, 0x0e, 0x90, 0xd4, 0x5b, 0x58, 0x94, 0xc4, 0xe9, 0xd8,
-	0x06, 0x15, 0x0e, 0xab, 0x89, 0x77, 0xea, 0x2c, 0x1a, 0xef, 0x9a, 0x9d, 0x71, 0x6a, 0x7f, 0x01,
-	0xc4, 0xb1, 0x47, 0x8e, 0x15, 0x7c, 0x05, 0xee, 0x5c, 0x7b, 0xec, 0x81, 0x03, 0xa7, 0x80, 0xdc,
-	0x0b, 0x1f, 0x80, 0x23, 0x07, 0x34, 0x33, 0xbb, 0xce, 0x26, 0x69, 0x89, 0x7a, 0x40, 0xe2, 0x36,
-	0xf3, 0xde, 0xef, 0xbd, 0x99, 0xf9, 0xbd, 0xb7, 0x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, 0x12, 0xfb, 0xee, 0xf7, 0x06, 0xac, 0x66, 0xff, 0x0d, 0xe8, 0x1a, 0x5c, 0xd1, 0x0f, 0x5b,
+	0xd7, 0x76, 0x5d, 0x67, 0xef, 0xd3, 0x33, 0x8f, 0x5f, 0x0d, 0x2e, 0x9d, 0x76, 0xdb, 0x0f, 0x6d,
+	0xfc, 0xa8, 0xb3, 0x67, 0x9b, 0x06, 0xba, 0x0a, 0x97, 0x4f, 0xfb, 0xee, 0x77, 0x76, 0x76, 0x3a,
+	0x5f, 0xd8, 0xb8, 0x6b, 0x2e, 0xa2, 0x2a, 0xac, 0x9f, 0x76, 0xee, 0xf6, 0xdc, 0xde, 0xd6, 0x8e,
+	0x99, 0x3b, 0x9f, 0x72, 0xd7, 0xde, 0x73, 0x9d, 0xce, 0x5e, 0xd7, 0xcc, 0xeb, 0x77, 0x73, 0xfb,
+	0xb3, 0xe7, 0xb3, 0xba, 0xf1, 0x62, 0x56, 0x37, 0x7e, 0x9d, 0xd5, 0x8d, 0xa7, 0x2f, 0xeb, 0x0b,
+	0x2f, 0x5e, 0xd6, 0x17, 0x7e, 0x7e, 0x59, 0x5f, 0xf8, 0xd2, 0x1a, 0x04, 0xe2, 0x70, 0x7c, 0x60,
+	0xf5, 0xa3, 0x61, 0x4b, 0x17, 0xe8, 0x7d, 0x46, 0x0e, 0x78, 0x32, 0x6e, 0x1d, 0xdd, 0x6e, 0x4d,
+	0x92, 0xbf, 0xb5, 0xd4, 0x3e, 0x7e, 0xb0, 0xac, 0xc4, 0xe4, 0xf6, 0x5f, 0x01, 0x00, 0x00, 0xff,
+	0xff, 0x0c, 0xf7, 0x48, 0x84, 0x78, 0x0b, 0x00, 0x00,
 }
 
 func (this *Post) Equal(that interface{}) bool {
@@ -1219,6 +1229,9 @@ func (this *PostReference) Equal(that interface{}) bool {
 	if this.PostID != that1.PostID {
 		return false
 	}
+	if this.Position != that1.Position {
+		return false
+	}
 	return true
 }
 func (this *Entities) Equal(that interface{}) bool {
@@ -1725,6 +1738,11 @@ func (m *PostReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
 	_ = i
 	var l int
 	_ = l
+	if m.Position != 0 {
+		i = encodeVarintModels(dAtA, i, uint64(m.Position))
+		i--
+		dAtA[i] = 0x18
+	}
 	if m.PostID != 0 {
 		i = encodeVarintModels(dAtA, i, uint64(m.PostID))
 		i--
@@ -2351,6 +2369,9 @@ func (m *PostReference) Size() (n int) {
 	if m.PostID != 0 {
 		n += 1 + sovModels(uint64(m.PostID))
 	}
+	if m.Position != 0 {
+		n += 1 + sovModels(uint64(m.Position))
+	}
 	return n
 }
 
@@ -3042,6 +3063,25 @@ func (m *PostReference) Unmarshal(dAtA []byte) error {
 					break
 				}
 			}
+		case 3:
+			if wireType != 0 {
+				return fmt.Errorf("proto: wrong wireType = %d for field Position", wireType)
+			}
+			m.Position = 0
+			for shift := uint(0); ; shift += 7 {
+				if shift >= 64 {
+					return ErrIntOverflowModels
+				}
+				if iNdEx >= l {
+					return io.ErrUnexpectedEOF
+				}
+				b := dAtA[iNdEx]
+				iNdEx++
+				m.Position |= uint64(b&0x7F) << shift
+				if b < 0x80 {
+					break
+				}
+			}
 		default:
 			iNdEx = preIndex
 			skippy, err := skipModels(dAtA[iNdEx:])


Test patch:
diff --git a/x/posts/types/models_test.go b/x/posts/types/models_test.go
index 1e89879e..00020b9c 100644
--- a/x/posts/types/models_test.go
+++ b/x/posts/types/models_test.go
@@ -291,6 +291,7 @@ func TestPost_Validate(t *testing.T) {
 			post: types.NewPost(
 				1,
 				2,
+				1,
 				"External id",
 				"Text",
 				"cosmos1eqpa6mv2jgevukaqtjmx5535vhc3mm3cf458zg",