Skip to content

Commit

Permalink
Message root record should be updated correctly (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier authored and Guantong committed Mar 21, 2023
1 parent 804c898 commit e749ec3
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 @@ -390,6 +390,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/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,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 e749ec3

Please sign in to comment.