mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
approval votes checking logs (#3233)
* approval-voting: logs for invalid votes * proper errors for assignment checks * proper errors for approval checks
This commit is contained in:
@@ -58,14 +58,34 @@ enum AssignmentCheckResult {
|
||||
// The vote was valid but too far in the future to accept right now.
|
||||
TooFarInFuture,
|
||||
// The vote was bad and should be ignored, reporting the peer who propagated it.
|
||||
Bad,
|
||||
Bad(AssignmentCheckError),
|
||||
}
|
||||
|
||||
pub enum AssignmentCheckError {
|
||||
UnknownBlock(Hash),
|
||||
UnknownSessionIndex(SessionIndex),
|
||||
InvalidCandidateIndex(CandidateIndex),
|
||||
InvalidCandidate(CandidateIndex, CandidateHash),
|
||||
InvalidCert(ValidatorIndex),
|
||||
Internal(Hash, CandidateHash),
|
||||
}
|
||||
|
||||
enum ApprovalCheckResult {
|
||||
// The vote was accepted and should be propagated onwards.
|
||||
Accepted,
|
||||
// The vote was bad and should be ignored, reporting the peer who propagated it.
|
||||
Bad,
|
||||
Bad(ApprovalCheckError),
|
||||
}
|
||||
|
||||
pub enum ApprovalCheckError {
|
||||
UnknownBlock(Hash),
|
||||
UnknownSessionIndex(SessionIndex),
|
||||
InvalidCandidateIndex(CandidateIndex),
|
||||
InvalidValidatorIndex(ValidatorIndex),
|
||||
InvalidCandidate(CandidateIndex, CandidateHash),
|
||||
InvalidSignature(ValidatorIndex),
|
||||
NoAssignment(ValidatorIndex),
|
||||
Internal(Hash, CandidateHash),
|
||||
}
|
||||
|
||||
enum ApprovalVotingMessage {
|
||||
|
||||
Reference in New Issue
Block a user