-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added Blockheight and Version #11
Conversation
@@ -29,6 +30,8 @@ type message struct { | |||
Commitment string `json:"commitment"` | |||
Proof string `json:"proof"` | |||
Cell string `json:"cell"` | |||
BlockHeight uint `json:"block_height"` |
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.
Lets use the same type as in event uint64
@@ -89,6 +92,9 @@ func (p *Publisher) PublishToCS(cid string, rowIndex int, colIndex int, status b | |||
Commitment: base64.StdEncoding.EncodeToString(commitment), | |||
Proof: base64.StdEncoding.EncodeToString(proof), | |||
Cell: base64.StdEncoding.EncodeToString(cell), | |||
BlockHeight: blockHeight, | |||
Version: common.Version, |
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.
Version: fmt.Sprintf("%s-%s", common.Version, common.Commit)
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.
Minor change and we are good.
@@ -109,6 +109,6 @@ func (el *EventListener) ProcessLogs() { | |||
continue | |||
} | |||
|
|||
el.sampler.ProcessEvent(parsedURL.Host, uint(event.BlockHeight)) | |||
el.sampler.ProcessEvent(parsedURL.Host, uint64(event.BlockHeight)) |
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.
BlockHeight is of type uint64, no need to use type conversion.
@@ -97,6 +98,8 @@ func (p *Publisher) PublishToCS(cid string, rowIndex int, colIndex int, status b | |||
|
|||
} | |||
|
|||
fmt.Sprintf("%s-%s", common.Version, common.GitCommit) |
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.
The result should go to Version.
} | ||
|
||
fmt.Printf("%s-%s", common.Version, common.GitCommit) |
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.
Comment above
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.
Let us pass version and the commit
Added Blockheight and Version fields to Pubsub