Skip to content

Commit

Permalink
Message root record should be updated correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Mar 21, 2023
1 parent 10a214f commit a9e4a0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pallet/ecdsa-authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ pub mod pallet {

if Self::check_threshold(collected.len() as _, authorities.len() as _) {
<NewMessageRootToSign<T>>::kill();
<PreviousMessageRoot<T>>::kill();

let (commitment, message, collected) = new_message_root_to_sign;

Expand Down
2 changes: 2 additions & 0 deletions pallet/ecdsa-authority/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,8 @@ fn submit_new_message_root_signature() {
signatures: vec![(a_1, s_1), (a_2, s_2)]
}]
);
assert!(EcdsaAuthority::new_message_root_to_sign().is_none());
assert!(EcdsaAuthority::previous_message_root().is_none());
});
}

Expand Down

0 comments on commit a9e4a0d

Please sign in to comment.