Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Warchant committed Jan 22, 2020
1 parent 65de80d commit c7751f5
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions src/vbk/test/unit/block_validation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct BlockValidationFixture : public TestChain100Setup {

BOOST_AUTO_TEST_SUITE(block_validation_tests)

BOOST_FIXTURE_TEST_CASE(BlockWith256PublicationTxes, BlockValidationFixture)
BOOST_FIXTURE_TEST_CASE(BlockWithTooManyPublicationTxes, BlockValidationFixture)
{
std::vector<CMutableTransaction> pubs;
for (size_t i = 0; i < 256 /* more than 50 */; ++i) {
Expand All @@ -83,7 +83,7 @@ BOOST_FIXTURE_TEST_CASE(BlockWith256PublicationTxes, BlockValidationFixture)
BOOST_CHECK(!isBlockValid);
}

BOOST_FIXTURE_TEST_CASE(BlockWithMaxNumberOfPublicationTxes, BlockValidationFixture)
BOOST_FIXTURE_TEST_CASE(BlockWithMaxNumberOfPopTxes, BlockValidationFixture)
{
auto& config = VeriBlock::getService<VeriBlock::Config>();
std::vector<CMutableTransaction> pubs;
Expand All @@ -99,32 +99,6 @@ BOOST_FIXTURE_TEST_CASE(BlockWithMaxNumberOfPublicationTxes, BlockValidationFixt
BOOST_CHECK(block.vtx.size() == config.max_pop_tx_amount + 1 /* coinbase */);
}

BOOST_FIXTURE_TEST_CASE(BlockWith1000ContextTxes, BlockValidationFixture)
{
std::vector<CMutableTransaction> pubs;
std::generate_n(std::back_inserter(pubs), 1000, [&]() {
return VeriBlock::MakePopTx(ctxscript);
});

bool isBlockValid = true;
auto block = CreateAndProcessBlock(pubs, cbKey, &isBlockValid);
BOOST_CHECK(!isBlockValid);
}

BOOST_FIXTURE_TEST_CASE(BlockWithMaxContextTxes, BlockValidationFixture)
{
auto& config = VeriBlock::getService<VeriBlock::Config>();
std::vector<CMutableTransaction> pubs;
std::generate_n(std::back_inserter(pubs), config.max_update_context_tx_amount, [&]() {
return VeriBlock::MakePopTx(ctxscript);
});

bool isBlockValid = true;
auto block = CreateAndProcessBlock(pubs, cbKey, &isBlockValid);
BOOST_CHECK(isBlockValid);
BOOST_CHECK(block.vtx.size() == config.max_update_context_tx_amount + 1 /* coinbase */);
}


BOOST_FIXTURE_TEST_CASE(BlockWithBothPopTxes, BlockValidationFixture)
{
Expand Down

0 comments on commit c7751f5

Please sign in to comment.