From d77b3a672cb5f3e210c419672aaed0643a8e87c2 Mon Sep 17 00:00:00 2001 From: winsvega Date: Mon, 9 Feb 2015 23:40:47 +0300 Subject: [PATCH] Bigint bigint(1) << 256 --- TestHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index fbb302f15..ed351bb73 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -108,7 +108,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) BOOST_REQUIRE(o.count("storage") > 0); BOOST_REQUIRE(o.count("code") > 0); - bigint biValue256 = bigint("115792089237316195423570985008687907853269984665640564039457584007913129639936"); + bigint biValue256 = bigint(1) << 256; if (bigint(o["balance"].get_str()) >= biValue256) BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'balance' is equal or greater than 2**256") ); if (bigint(o["nonce"].get_str()) >= biValue256) @@ -146,7 +146,7 @@ void ImportTest::importTransaction(json_spirit::mObject& _o) BOOST_REQUIRE(_o.count("secretKey") > 0); BOOST_REQUIRE(_o.count("data") > 0); - bigint biValue256 = bigint("115792089237316195423570985008687907853269984665640564039457584007913129639936"); + bigint biValue256 = bigint(1) << 256; if (bigint(_o["nonce"].get_str()) >= biValue256) BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("Transaction 'nonce' is equal or greater than 2**256") ); if (bigint(_o["gasPrice"].get_str()) >= biValue256)