From e9a5412a548b48fc4b7269e60ad72ea71bb1f3c6 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 May 2023 12:03:35 +0300 Subject: [PATCH] Add default implementation for OnNewAccount and OnKilledAccount for empty tuple --- frame/evm-system/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frame/evm-system/src/lib.rs b/frame/evm-system/src/lib.rs index b8585ca470..0910a82ee5 100644 --- a/frame/evm-system/src/lib.rs +++ b/frame/evm-system/src/lib.rs @@ -178,8 +178,16 @@ pub trait OnNewAccount { fn on_new_account(who: &AccountId); } +impl OnNewAccount for () { + fn on_new_account(_who: &AccountId) {} +} + /// Interface to handle account killing. pub trait OnKilledAccount { /// The account with the given id was reaped. fn on_killed_account(who: &AccountId); } + +impl OnKilledAccount for () { + fn on_killed_account(_who: &AccountId) {} +}