EVMHost: Add tracing features needed for fuzzing.

This commit is contained in:
Bhargava Shastry
2021-03-10 17:41:03 +01:00
parent 89946b15d2
commit 34c08ea2c6
7 changed files with 106 additions and 43 deletions
+7 -2
View File
@@ -91,10 +91,15 @@ public:
/// The address of the beneficiary account.
address beneficiary;
/// The balance of the self-destructed account.
uint256be balance;
/// Equal operator.
bool operator==(const selfdestuct_record& other) const noexcept
{
return selfdestructed == other.selfdestructed && beneficiary == other.beneficiary;
return selfdestructed == other.selfdestructed &&
beneficiary == other.beneficiary &&
balance == other.balance;
}
};
@@ -265,7 +270,7 @@ public:
void selfdestruct(const address& addr, const address& beneficiary) noexcept override
{
record_account_access(addr);
recorded_selfdestructs.push_back({addr, beneficiary});
recorded_selfdestructs.push_back({addr, beneficiary, get_balance(addr)});
}
/// Call/create other contract (EVMC host method).