Add test to ensure parent treestates only can appear earlier in the transaction or in the global state, not later.

This commit is contained in:
Sean Bowe 2016-06-07 21:05:25 -06:00
parent 10c33f0f87
commit 49ab032b5f
1 changed files with 16 additions and 0 deletions

View File

@ -251,6 +251,22 @@ BOOST_AUTO_TEST_CASE(chained_pours)
BOOST_CHECK(!cache.HavePourRequirements(mtx));
}
{
CMutableTransaction mtx;
mtx.vpour.push_back(ptx2);
mtx.vpour.push_back(ptx1);
BOOST_CHECK(!cache.HavePourRequirements(mtx));
}
{
CMutableTransaction mtx;
mtx.vpour.push_back(ptx1);
mtx.vpour.push_back(ptx2);
BOOST_CHECK(cache.HavePourRequirements(mtx));
}
{
CMutableTransaction mtx;
mtx.vpour.push_back(ptx1);