mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-12 21:57:06 +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:
1 parent
4797fb7dfb
commit
93e42fb213
6 files changed
+149
-50
No files matched your search
@@ -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