aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-02-06 22:00:06 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-02-06 22:00:06 +0800
commitad1a26c5035481e760cfdaf748fb26bee7e7beb2 (patch)
treea85de54cc261ab33365c791cdfa0bd18a50e2322
parentdd965586342f3b00714dbd45c9931fb034435a52 (diff)
downloaddexon-solidity-ad1a26c5035481e760cfdaf748fb26bee7e7beb2.tar.gz
dexon-solidity-ad1a26c5035481e760cfdaf748fb26bee7e7beb2.tar.zst
dexon-solidity-ad1a26c5035481e760cfdaf748fb26bee7e7beb2.zip
include transaction list
-rw-r--r--block.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/block.cpp b/block.cpp
index 674c7c40..40984e8d 100644
--- a/block.cpp
+++ b/block.cpp
@@ -144,8 +144,30 @@ void doBlockTests(json_spirit::mValue& _v, bool _fillin)
}
catch(...)
{
+ cnote << "block construction did throw an unknow exception\n";
o.erase(o.find("block"));
}
+
+ BOOST_REQUIRE(o.count("transactions") > 0);
+
+ for (auto const& txObj: o["transactions"].get_array())
+ {
+ mObject tx = txObj.get_obj();
+ BOOST_REQUIRE(tx.count("nonce") > 0);
+ BOOST_REQUIRE(tx.count("gasPrice") > 0);
+ BOOST_REQUIRE(tx.count("gasLimit") > 0);
+ BOOST_REQUIRE(tx.count("to") > 0);
+ BOOST_REQUIRE(tx.count("value") > 0);
+ BOOST_REQUIRE(tx.count("v") > 0);
+ BOOST_REQUIRE(tx.count("r") > 0);
+ BOOST_REQUIRE(tx.count("s") > 0);
+ BOOST_REQUIRE(tx.count("data") > 0);
+
+ Transaction txFromFields = createTransactionFromFields(tx);
+
+
+
+ }
}
}
}