Skip to content

Commit

Permalink
Remove panic, as proof is invalid. (#5427)
Browse files Browse the repository at this point in the history
`validity_vote` function is also called from `import_statement` not only
from `import_candidate`. The proof still holds if we assume seconded
statements always come before valid statements, which should be the case
but is not actually enforced by this module at all. On top of this the
proof is not local.

Co-authored-by: eskimor <[email protected]>
  • Loading branch information
eskimor and eskimor committed Aug 24, 2024
1 parent 16b0fd0 commit f095e04
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions polkadot/statement-table/src/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,7 @@ impl<Ctx: Context> Table<Ctx> {
if !context.is_member_of(&from, &votes.group_id) {
let sig = match vote {
ValidityVote::Valid(s) => s,
ValidityVote::Issued(_) => panic!(
"implicit issuance vote only cast from `import_candidate` after \
checking group membership of issuer; qed"
),
ValidityVote::Issued(s) => s,
};

return Err(Misbehavior::UnauthorizedStatement(UnauthorizedStatement {
Expand Down

0 comments on commit f095e04

Please sign in to comment.