mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
All Fields Hex: VMTests
This commit is contained in:
parent
bfa1e9b7b9
commit
10245ce4b3
@ -126,7 +126,15 @@ json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
|
|||||||
if (key == "to")
|
if (key == "to")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
string str = (*it).second.get_str();
|
string str;
|
||||||
|
json_spirit::mValue value = (*it).second;
|
||||||
|
|
||||||
|
if (value.type() == json_spirit::int_type)
|
||||||
|
str = toString(value.get_int());
|
||||||
|
else if (value.type() == json_spirit::str_type)
|
||||||
|
str = value.get_str();
|
||||||
|
else continue;
|
||||||
|
|
||||||
_o[key] = (str.substr(0, 2) == "0x" ||
|
_o[key] = (str.substr(0, 2) == "0x" ||
|
||||||
str.find("a") != string::npos ||
|
str.find("a") != string::npos ||
|
||||||
str.find("b") != string::npos ||
|
str.find("b") != string::npos ||
|
||||||
|
2
vm.cpp
2
vm.cpp
@ -85,7 +85,7 @@ void FakeExtVM::reset(u256 _myBalance, u256 _myNonce, map<u256, u256> const& _st
|
|||||||
|
|
||||||
void FakeExtVM::push(mObject& o, string const& _n, u256 _v)
|
void FakeExtVM::push(mObject& o, string const& _n, u256 _v)
|
||||||
{
|
{
|
||||||
o[_n] = toString(_v);
|
o[_n] = "0x" + toHex(toCompactBigEndian(_v));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FakeExtVM::push(mArray& a, u256 _v)
|
void FakeExtVM::push(mArray& a, u256 _v)
|
||||||
|
Loading…
Reference in New Issue
Block a user