Merge pull request #403 from ethereum/fix_cpp_get_balance

cpp: Use evmc::uint256be instead of evmc_uint256be in get_balance()
This commit is contained in:
Paweł Bylica 2019-08-15 23:45:14 +02:00 committed by GitHub
commit fb0cbd7bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -5,6 +5,15 @@ Documentation of all notable changes to the **EVMC** project.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].
## [6.3.1] - unreleased
### Fixed
- In C++ API the `get_balance()` method now returns expected `evmc::uint256be`
instead of `evmc_uint256be`.
[[#403](https://github.com/ethereum/evmc/pull/403)]
## [6.3.0] - 2019-08-12
### Added
@ -319,6 +328,7 @@ and this project adheres to [Semantic Versioning].
[[#52](https://github.com/ethereum/evmc/pull/52)]
[6.3.1]: https://github.com/ethereum/evmc/compare/v6.3.0...release/6.3
[6.3.0]: https://github.com/ethereum/evmc/releases/tag/v6.3.0
[6.2.2]: https://github.com/ethereum/evmc/releases/tag/v6.2.2
[6.2.1]: https://github.com/ethereum/evmc/releases/tag/v6.2.1

View File

@ -55,7 +55,7 @@ public:
return (prev_value == value) ? EVMC_STORAGE_UNCHANGED : EVMC_STORAGE_MODIFIED;
}
evmc_uint256be get_balance(const evmc::address& addr) noexcept final
evmc::uint256be get_balance(const evmc::address& addr) noexcept final
{
auto it = accounts.find(addr);
if (it != accounts.end())

View File

@ -434,7 +434,7 @@ public:
const bytes32& value) noexcept = 0;
/// @copydoc evmc_host_interface::get_balance
virtual evmc_uint256be get_balance(const address& addr) noexcept = 0;
virtual uint256be get_balance(const address& addr) noexcept = 0;
/// @copydoc evmc_host_interface::get_code_size
virtual size_t get_code_size(const address& addr) noexcept = 0;
@ -498,7 +498,7 @@ public:
return context->host->set_storage(context, &address, &key, &value);
}
evmc_uint256be get_balance(const address& address) noexcept final
uint256be get_balance(const address& address) noexcept final
{
return context->host->get_balance(context, &address);
}