replace CollectedCommitment with a HashMap
This commit is contained in:
parent
b70e15eefe
commit
de1a1bed37
|
@ -124,21 +124,13 @@ struct Commitment {
|
||||||
struct MsgSigningPackage {
|
struct MsgSigningPackage {
|
||||||
/// The number of participants.
|
/// The number of participants.
|
||||||
participants: u8,
|
participants: u8,
|
||||||
/// The collected commitments for each signer
|
/// The collected commitments for each signer as a hashmap of
|
||||||
commitments: Vec<CollectedCommitment>,
|
/// unique participant identifiers
|
||||||
|
commitments: HashMap<Participant, Commitment>,
|
||||||
/// The message to be signed as a vector of bytes
|
/// The message to be signed as a vector of bytes
|
||||||
message: Vec<u8>,
|
message: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The aggregator collected commitments for each signer in the
|
|
||||||
/// scheme.
|
|
||||||
struct CollectedCommitment {
|
|
||||||
/// The signer's participant identifier
|
|
||||||
signer_id: Participant,
|
|
||||||
/// Commitment for this signer
|
|
||||||
commitment: Commitment,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Each signer sends their signatures to the aggregator who is going to collect them
|
/// Each signer sends their signatures to the aggregator who is going to collect them
|
||||||
/// and generate a final spend signature.
|
/// and generate a final spend signature.
|
||||||
struct MsgSignatureShare {
|
struct MsgSignatureShare {
|
||||||
|
@ -277,7 +269,7 @@ Bytes | Field name | Data type
|
||||||
Bytes | Field name | Data type
|
Bytes | Field name | Data type
|
||||||
-----------------------|----------------|-----------
|
-----------------------|----------------|-----------
|
||||||
1 | participants | u8
|
1 | participants | u8
|
||||||
(1+32+32)*partipants | commitments | Vec<CollectedCommitment>
|
(1+32+32)*partipants | commitments | HashMap<Participant, Commitment>
|
||||||
8 | message_length | u64
|
8 | message_length | u64
|
||||||
message_length | message | Vec<u8>
|
message_length | message | Vec<u8>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue