You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type CastVoteReply struct {
Ticket string `json:"ticket"` // Ticket ID
Receipt string `json:"receipt"` // Server signature of client signature
// The follwing fields will only be present if an error occurred
// while attempting to cast the vote.
ErrorCode VoteErrorT `json:"errorcode,omitempty"`
ErrorContext string `json:"errorcontext,omitempty"`
}
This means that the ErrorCode is 0 when the vote is cast succesfully and a 0 error code corresponds to VoteErrorInvalid. This is incorrect. The ErrorCode should be nil on success. The reply should contain a pointer to the error.
The error handling code in politeiavoter needs to be updated once this is fixed. The decrediton error handling should also be checked to see if it needs to be updated as well. This doesn't impact non-go clients because the fields are not included in the JSON.
The cast vote reply is defined as:
This means that the
ErrorCode
is0
when the vote is cast succesfully and a0
error code corresponds toVoteErrorInvalid
. This is incorrect. TheErrorCode
should benil
on success. The reply should contain a pointer to the error.The error handling code in politeiavoter needs to be updated once this is fixed.
The decrediton error handling should also be checked to see if it needs to be updated as well.This doesn't impact non-go clients because the fields are not included in the JSON.This bug was introduced by #1180.
The text was updated successfully, but these errors were encountered: