From 0b08553e48ce2e9a237478ccd1aebef9d935a5ab Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 31 May 2024 16:55:25 +0200 Subject: [PATCH] fix: flush fake transaction in on_finalize for logs emitted in on_idle (XCM) --- frame/ethereum/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frame/ethereum/src/lib.rs b/frame/ethereum/src/lib.rs index b7ccfa7151..313a7f9608 100644 --- a/frame/ethereum/src/lib.rs +++ b/frame/ethereum/src/lib.rs @@ -209,6 +209,8 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_finalize(n: BlockNumberFor) { + Self::flush_injected_transaction(); + >::store_block( match fp_consensus::find_pre_log(&frame_system::Pallet::::digest()) { Ok(_) => None, @@ -735,7 +737,7 @@ impl Pallet { EIP658ReceiptData, EnvelopedEncodable, TransactionSignature, TransactionV0, }; - assert!( + debug_assert!( fp_consensus::find_pre_log(&frame_system::Pallet::::digest()).is_err(), "this method is supposed to be called only from other pallets", );