Skip to content

Replace Participant enum with two distinct structures #416

@ibaryshnikov

Description

@ibaryshnikov

Initially many functions were dealing with both verifier and contributor at the same time. But after some time these roles have diverged, and most of the functions start with the check like this:

if participant.is_verifier() {
     return Err(CoordinatorError::ExpectedContributor);
}

Having two distinct structures instead of an enum will allow to catch many errors in compile time rather than in runtime. It will also reduce the size of many functions, which improves the maintenance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2moderate priorityenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions