diff --git a/.gitattributes b/.gitattributes index 32317fb8f3..2bb6dcc6de 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ assets/** linguist-vendored documentation/** linguist-vendored +tests/** linguist-vendored \ No newline at end of file diff --git a/crates/revm/src/inspector/handler_register.rs b/crates/revm/src/inspector/handler_register.rs index 599ab9fc6a..4f28508f61 100644 --- a/crates/revm/src/inspector/handler_register.rs +++ b/crates/revm/src/inspector/handler_register.rs @@ -67,16 +67,25 @@ pub fn inspector_handle_register>( // execute selfdestruct prev(interpreter, host); // check if selfdestruct was successful and if journal entry is made. - if let Some(JournalEntry::AccountDestroyed { - address, - target, - had_balance, - .. - }) = host.evm.journaled_state.journal.last().unwrap().last() - { - host.external - .get_inspector() - .selfdestruct(*address, *target, *had_balance); + match host.evm.journaled_state.journal.last().unwrap().last() { + Some(JournalEntry::AccountDestroyed { + address, + target, + had_balance, + .. + }) => { + host.external + .get_inspector() + .selfdestruct(*address, *target, *had_balance); + } + Some(JournalEntry::BalanceTransfer { + from, to, balance, .. + }) => { + host.external + .get_inspector() + .selfdestruct(*from, *to, *balance); + } + _ => {} } });