File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
substrate/frame/revive/src Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1744,6 +1744,16 @@ where
17441744 // we do this last as we cannot roll this back
17451745 transaction_meter. terminate ( contract_account. clone ( ) , refund) ;
17461746
1747+ // emit selfdestruct trace
1748+ if_tracing ( |t| {
1749+ t. terminate (
1750+ contract_address,
1751+ T :: AddressMapper :: to_address ( & args. beneficiary ) ,
1752+ 0 , // gas is tracked separately; termination happens at end of call stack
1753+ balance,
1754+ ) ;
1755+ } ) ;
1756+
17471757 Ok ( ( ) )
17481758 } ;
17491759
@@ -1753,7 +1763,6 @@ where
17531763 with_transaction ( || -> TransactionOutcome < Result < _ , DispatchError > > {
17541764 match delete_contract ( & args. trie_id , & args. code_hash ) {
17551765 Ok ( ( ) ) => {
1756- // TODO: emit sucicide trace
17571766 log:: trace!( target: LOG_TARGET , "Terminated {contract_address:?}" ) ;
17581767 TransactionOutcome :: Commit ( Ok ( ( ) ) )
17591768 } ,
You can’t perform that action at this time.
0 commit comments