File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -802,7 +802,7 @@ impl<T: Config> Pallet<T> {
802802 pub fn remove_account ( address : & H160 ) {
803803 if <AccountCodes < T > >:: contains_key ( address) {
804804 let account_id = T :: AddressMapping :: into_account_id ( * address) ;
805- T :: AccountProvider :: remove_account ( & account_id) ;
805+ T :: AccountProvider :: on_account_self_destruct ( & account_id) ;
806806 }
807807
808808 <AccountCodes < T > >:: remove ( address) ;
@@ -1079,7 +1079,7 @@ impl<T: frame_system::Config> AccountProvider for NativeSystemAccountProvider<T>
10791079 fn create_account ( who : & Self :: AccountId ) {
10801080 let _ = frame_system:: Pallet :: < T > :: inc_sufficients ( & who) ;
10811081 }
1082- fn remove_account ( who : & Self :: AccountId ) {
1082+ fn on_account_self_destruct ( who : & Self :: AccountId ) {
10831083 let _ = frame_system:: Pallet :: < T > :: dec_sufficients ( & who) ;
10841084 }
10851085}
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ pub trait AccountProvider {
2626 ///
2727 /// The account associated with new created address EVM.
2828 fn create_account ( who : & Self :: AccountId ) ;
29- /// Removes an account from accounts records .
29+ /// A hook on account affected by executing selfdestruct opcode .
3030 ///
31- /// The account associated with removed address from EVM.
32- fn remove_account ( who : & Self :: AccountId ) ;
31+ /// The account associated with affected address in EVM.
32+ fn on_account_self_destruct ( who : & Self :: AccountId ) ;
3333 /// Return current account nonce value.
3434 ///
3535 /// Used to represent account basic information in EVM format.
You can’t perform that action at this time.
0 commit comments