Skip to content

Commit

Permalink
GH-599 added protocol feature activation for crypto primatives
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcgundlach committed Jul 15, 2022
1 parent ee0dd02 commit 1a17c5c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions unittests/state_history_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,16 @@ BOOST_AUTO_TEST_CASE(test_deltas_resources_history) {
}

BOOST_AUTO_TEST_CASE(test_deltas_contract_several_rows){
table_deltas_tester chain(setup_policy::none);
table_deltas_tester chain(setup_policy::preactivate_feature_and_new_bios );

chain.produce_block();

const auto& pfm = chain.control->get_protocol_feature_manager();
const auto& d = pfm.get_builtin_digest( builtin_protocol_feature_t::crypto_primitives );
BOOST_REQUIRE( d );

chain.preactivate_protocol_features( {*d} );
chain.produce_block();
chain.create_account("tester"_n);

chain.set_code("tester"_n, contracts::get_table_test_wasm());
Expand Down Expand Up @@ -501,7 +507,7 @@ BOOST_AUTO_TEST_CASE(test_deltas_resources_history) {
BOOST_REQUIRE(expected_contract_row_table_primary_keys == result_contract_row_table_primary_keys);

chain.produce_block();
/* TODO erasenumobj does not exist in mandel

trace = chain.push_action("tester"_n, "erasenumobj"_n, "tester"_n, mutable_variant_object()("id", 1));
BOOST_REQUIRE_EQUAL(transaction_receipt::executed, trace->receipt->status);

Expand Down Expand Up @@ -529,7 +535,7 @@ BOOST_AUTO_TEST_CASE(test_deltas_resources_history) {
BOOST_REQUIRE_EQUAL(it_contract_index_double->rows.obj[i].first, 0);
BOOST_REQUIRE_EQUAL(contract_index_double_elems[i].table.to_string(), "numobjs.....2");
}
*/

}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit 1a17c5c

Please sign in to comment.