From 83158786fe969ece540150ea102fe2e70e578e43 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Tue, 4 May 2021 12:19:26 -0300 Subject: [PATCH] remove msg type numbers, fix version msg --- rfcs/0001-messages.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/rfcs/0001-messages.md b/rfcs/0001-messages.md index 3d8f85c..cc0ee7d 100644 --- a/rfcs/0001-messages.md +++ b/rfcs/0001-messages.md @@ -63,18 +63,17 @@ Here we explore in detail the header types and all the message payloads. Fields of the header define new types. Proposed implementation for them is as follows: ```rust +#[repr(u8)] +#[non_exhaustive] enum MsgType { - DealerBroadcast = 1, - Commitments = 2, - SigningPackage = 3, - SignatureShare = 4, - FinalSignature = 5, + DealerBroadcast, + Commitments, + SigningPackage, + SignatureShare, + FinalSignature, } -enum MsgVersion { - FirstVersion = 1, - .. -} +struct MsgVersion(u8); struct Participant(u8); ```