提交 fed461e2 编写于 作者: C Ciju John

Move method to child. Remove redundant constructor argument.

上级 2b005cba
...@@ -21,7 +21,6 @@ namespace eosio { namespace testing { ...@@ -21,7 +21,6 @@ namespace eosio { namespace testing {
void close(); void close();
void open(); void open();
void push_genesis_block();
signed_block produce_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms) ); signed_block produce_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms) );
void produce_blocks( uint32_t n = 1 ); void produce_blocks( uint32_t n = 1 );
...@@ -103,6 +102,8 @@ namespace eosio { namespace testing { ...@@ -103,6 +102,8 @@ namespace eosio { namespace testing {
class tester : public base_tester { class tester : public base_tester {
public: public:
tester(chain_controller::runtime_limits limits = chain_controller::runtime_limits()); tester(chain_controller::runtime_limits limits = chain_controller::runtime_limits());
void push_genesis_block();
}; };
/** /**
......
...@@ -30,11 +30,6 @@ namespace eosio { namespace testing { ...@@ -30,11 +30,6 @@ namespace eosio { namespace testing {
open(); open();
} }
void base_tester::push_genesis_block() {
set_code(config::system_account_name, test_system_wast);
set_abi(config::system_account_name, test_system_abi);
}
public_key_type base_tester::get_public_key( name keyname, string role ) const { public_key_type base_tester::get_public_key( name keyname, string role ) const {
return get_private_key( keyname, role ).get_public_key(); return get_private_key( keyname, role ).get_public_key();
} }
...@@ -367,4 +362,11 @@ namespace eosio { namespace testing { ...@@ -367,4 +362,11 @@ namespace eosio { namespace testing {
push_genesis_block(); push_genesis_block();
} }
void tester::push_genesis_block() {
set_code(config::system_account_name, test_system_wast);
set_abi(config::system_account_name, test_system_abi);
}
} } /// eosio::test } } /// eosio::test
...@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE( schedule_test ) { try { ...@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE( schedule_test ) { try {
BOOST_AUTO_TEST_CASE( push_block ) { try { BOOST_AUTO_TEST_CASE( push_block ) { try {
tester test1; tester test1;
base_tester test2(chain_controller::runtime_limits{}); base_tester test2;
for (uint32 i = 0; i < 1000; ++i) { for (uint32 i = 0; i < 1000; ++i) {
test2.control->push_block(test1.produce_block()); test2.control->push_block(test1.produce_block());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册