-
Notifications
You must be signed in to change notification settings - Fork 23
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
First pass API for introspection of edges and assertions #371
Conversation
… and not just testing the handler in isolation
|
||
// Validator's point of view | ||
// IsHonest bool `json:"isHonest"` | ||
// AgreesWithStartCommitment `json:"agreesWithStartCommitment"` |
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.
// Validator's point of view | |
// IsHonest bool `json:"isHonest"` | |
// AgreesWithStartCommitment `json:"agreesWithStartCommitment"` |
EndCommitment: toCommitment(e.EndCommitment), | ||
MutualID: common.Hash(e.MutualId()), | ||
OriginID: common.Hash(e.OriginId()), | ||
ClaimID: func() common.Hash { |
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 pattern is so neat
EndHeight: e.EndCommitment.Height, | ||
EndCommit: mock.Commit(e.EndCommitment.Hash.Bytes()), | ||
OriginID: mock.OriginId(e.OriginID.Bytes()), | ||
ClaimID: string(e.ClaimID.Bytes()), |
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.
There's a .String() method on hashes too
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.
Yes, but that returns it in the hex string form where we need it to be back in the original form
Working on adding API endpoints that would be useful for introspection into the validator and the current edges or challenges.
Work-in-progress and looking for early review.
Current progress:
Future work: