File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -794,7 +794,7 @@ impl<T: Config> Pallet<T> {
794794 pub fn remove_account ( address : & H160 ) {
795795 if <AccountCodes < T > >:: contains_key ( address) {
796796 let account_id = T :: AddressMapping :: into_account_id ( * address) ;
797- T :: AccountProvider :: remove_account ( & account_id) ;
797+ T :: AccountProvider :: on_account_self_destruct ( & account_id) ;
798798 }
799799
800800 <AccountCodes < T > >:: remove ( address) ;
@@ -1069,7 +1069,7 @@ impl<T: frame_system::Config> AccountProvider for NativeSystemAccountProvider<T>
10691069 fn create_account ( who : & Self :: AccountId ) {
10701070 let _ = frame_system:: Pallet :: < T > :: inc_sufficients ( & who) ;
10711071 }
1072- fn remove_account ( who : & Self :: AccountId ) {
1072+ fn on_account_self_destruct ( who : & Self :: AccountId ) {
10731073 let _ = frame_system:: Pallet :: < T > :: dec_sufficients ( & who) ;
10741074 }
10751075}
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