All Fields Hex: VMTests

This commit is contained in:
winsvega 2015-04-10 02:13:54 +03:00
parent 3e605abea4
commit c867e185bf

View File

@ -131,7 +131,11 @@ json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
if (std::find(std::begin(hashes), std::end(hashes), key) != std::end(hashes))
continue;
<<<<<<< HEAD
std::string str;
=======
string str;
>>>>>>> All Fields Hex: VMTests
json_spirit::mValue value = (*it).second;
if (value.type() == json_spirit::int_type)
@ -140,7 +144,18 @@ json_spirit::mObject& ImportTest::makeAllFieldsHex(json_spirit::mObject& _o)
str = value.get_str();
else continue;
<<<<<<< HEAD
_o[key] = (str.substr(0, 2) == "0x") ? str : "0x" + toHex(toCompactBigEndian(toInt(str)));
=======
_o[key] = (str.substr(0, 2) == "0x" ||
str.find("a") != string::npos ||
str.find("b") != string::npos ||
str.find("c") != string::npos ||
str.find("d") != string::npos ||
str.find("e") != string::npos ||
str.find("f") != string::npos
) ? str : "0x" + toHex(toCompactBigEndian(toInt(str)));
>>>>>>> All Fields Hex: VMTests
}
return _o;
}