Skip to content

Commit

Permalink
fix: flush fake transaction in on_finalize for logs emitted in on_idl…
Browse files Browse the repository at this point in the history
…e (XCM)
  • Loading branch information
CertainLach committed May 31, 2024
1 parent 7656405 commit 0b08553
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frame/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ pub mod pallet {
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_finalize(n: BlockNumberFor<T>) {
Self::flush_injected_transaction();

<Pallet<T>>::store_block(
match fp_consensus::find_pre_log(&frame_system::Pallet::<T>::digest()) {
Ok(_) => None,
Expand Down Expand Up @@ -735,7 +737,7 @@ impl<T: Config> Pallet<T> {
EIP658ReceiptData, EnvelopedEncodable, TransactionSignature, TransactionV0,
};

assert!(
debug_assert!(
fp_consensus::find_pre_log(&frame_system::Pallet::<T>::digest()).is_err(),
"this method is supposed to be called only from other pallets",
);
Expand Down

0 comments on commit 0b08553

Please sign in to comment.