EVMHost: Fix selfdestruct with non-zero value at beneficiary and value-transfers with insufficient funds

Create a helper for transfering balance between two accounts. Check sufficient funds are available during a call-with-value.
This commit is contained in:
Alex Beregszaszi
2021-05-14 00:10:49 +01:00
parent 324caef53c
commit a54699f452
2 changed files with 19 additions and 4 deletions
+2
View File
@@ -91,6 +91,8 @@ public:
private:
evmc::address m_currentAddress = {};
void transfer(evmc::MockedAccount& _sender, evmc::MockedAccount& _recipient, u256 const& _value) noexcept;
/// Records calls made via @param _message.
void recordCalls(evmc_message const& _message) noexcept;