diff --git a/res/ethereum/tests b/res/ethereum/tests index e838fd909..dc86e6359 160000 --- a/res/ethereum/tests +++ b/res/ethereum/tests @@ -1 +1 @@ -Subproject commit e838fd90998fc5502d0b7c9427a4c231f9a6953d +Subproject commit dc86e6359675440aea59ddb48648a01c799925d8 diff --git a/src/externalities.rs b/src/externalities.rs index f9a79c3c0..6a874330c 100644 --- a/src/externalities.rs +++ b/src/externalities.rs @@ -215,7 +215,13 @@ impl<'a> Ext for Externalities<'a> { fn suicide(&mut self, refund_address: &Address) { let address = self.origin_info.address.clone(); let balance = self.balance(&address); - self.state.transfer_balance(&address, refund_address, &balance); + if &address == refund_address { + // TODO [todr] To be consisted with CPP client we set balance to 0 in that case. + self.state.sub_balance(&address, &balance); + } else { + trace!("Suiciding {} -> {} (xfer: {})", address, refund_address, balance); + self.state.transfer_balance(&address, refund_address, &balance); + } self.substate.suicides.insert(address); }