Small refactoring of `Canonical`
The Canonical type is generally constructed with the threshold, needed for the quorum computation, in scope. To make it easier to use and encapsulate its functionality, it now holds the threshold as an additional field.
Changes for the Canonical type:
- Reorder arguments so that
delegatesandthresholdare grouped afterrefname - Add
Canonical::is_emptyto detect whenCanonicalwas constructed with no tips - Consume
Canonicalwhen callingCanonical::quorumto indicate that it should be the final step
The Canonical type is generally constructed with the threshold, needed for the quorum computation, in scope. To make it easier to use and encapsulate its functionality, it now holds the threshold as an additional field.
Changes for the Canonical type:
- Reorder arguments so that
delegatesandthresholdare grouped afterrefname - Add
Canonical::is_emptyto detect whenCanonicalwas constructed with no tips - Consume
Canonicalwhen callingCanonical::quorumto indicate that it should be the final step