From a9e4a0d7edc114d42b2f2cfb6ebeb3b24e19bb2b Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Tue, 21 Mar 2023 17:59:42 +0800 Subject: [PATCH] Message root record should be updated correctly --- pallet/ecdsa-authority/src/lib.rs | 1 + pallet/ecdsa-authority/src/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 03d412c44..310c0fd23 100644 --- a/pallet/ecdsa-authority/src/lib.rs +++ b/pallet/ecdsa-authority/src/lib.rs @@ -403,6 +403,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/src/tests.rs b/pallet/ecdsa-authority/src/tests.rs index c7c2b3453..21ee91522 100644 --- a/pallet/ecdsa-authority/src/tests.rs +++ b/pallet/ecdsa-authority/src/tests.rs @@ -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()); }); }