From e749ec3813654cc2120bd87b72450af8537a0edb Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Tue, 21 Mar 2023 22:11:10 +0800 Subject: [PATCH] Message root record should be updated correctly (#1048) --- pallet/ecdsa-authority/src/lib.rs | 1 + pallet/ecdsa-authority/tests/tests.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pallet/ecdsa-authority/src/lib.rs b/pallet/ecdsa-authority/src/lib.rs index 24a54d144..df58132e3 100644 --- a/pallet/ecdsa-authority/src/lib.rs +++ b/pallet/ecdsa-authority/src/lib.rs @@ -390,6 +390,7 @@ pub mod pallet { if Self::check_threshold(collected.len() as _, authorities.len() as _) { >::kill(); + >::kill(); let (commitment, message, collected) = new_message_root_to_sign; diff --git a/pallet/ecdsa-authority/tests/tests.rs b/pallet/ecdsa-authority/tests/tests.rs index ee63e1214..836c96908 100644 --- a/pallet/ecdsa-authority/tests/tests.rs +++ b/pallet/ecdsa-authority/tests/tests.rs @@ -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()); }); }