提交 422c40f7 编写于 作者: N Nathan Hourt

Fix *all* the tests

上级 477afee4
......@@ -142,12 +142,12 @@
#define UPPDCR4(chain, owner, key, cfg) \
{ \
eos::chain::SignedTransaction trx; \
trx.emplaceMessage(config::StakedBalanceContractName, vector<AccountName>{#owner}, \
trx.emplaceMessage(config::StakedBalanceContractName, vector<AccountName>{owner}, \
vector<types::AccountPermission>{}, \
"setproducer", types::setproducer{owner, key, cfg}); \
trx.expiration = chain.head_block_time() + 100; \
trx.set_reference_block(chain.head_block_id()); \
chain.push_transaction(trx); \
BOOST_TEST_CHECKPOINT("Update producer " << #owner); \
BOOST_TEST_CHECKPOINT("Update producer " << owner); \
}
#define UPPDCR3(chain, owner, key) UPPDCR4(chain, owner, key, chain.get_producer(owner).configuration)
......@@ -177,7 +177,8 @@ BOOST_FIXTURE_TEST_CASE(create_script, testing_fixture)
{
eos::chain::SignedTransaction trx;
trx.messages.resize(1);
trx.messages[0].recipients = {"simplecoin", config::SystemContractName};
trx.messages[0].code = config::SystemContractName;
trx.messages[0].recipients = {"simplecoin"};
trx.setMessage(0, "setcode", handler);
trx.expiration = chain.head_block_time() + 100;
trx.set_reference_block(chain.head_block_id());
......@@ -190,7 +191,7 @@ BOOST_FIXTURE_TEST_CASE(create_script, testing_fixture)
for (uint32_t i = 0; i < 100000; ++i)
{
eos::chain::SignedTransaction trx;
trx.emplaceMessage("simplecoin", vector<AccountName>{"simplecoin", "inita"},
trx.emplaceMessage("simplecoin", vector<AccountName>{"inita"},
vector<types::AccountPermission>{},
"transfer", types::transfer{"simplecoin", "inita", 1+i, "hello"});
trx.expiration = chain.head_block_time() + 100;
......@@ -971,7 +972,8 @@ R"(
eos::chain::SignedTransaction trx;
trx.messages.resize(1);
trx.messages[0].recipients = {"simplecoin", config::SystemContractName};
trx.messages[0].code = config::SystemContractName;
trx.messages[0].recipients = {"simplecoin"};
trx.setMessage(0, "setcode", handler);
trx.expiration = chain.head_block_time() + 100;
trx.set_reference_block(chain.head_block_id());
......
......@@ -99,6 +99,7 @@ BOOST_FIXTURE_TEST_CASE(transfer, testing_fixture)
auto unpacked = fc::raw::unpack<UInt64>(packed);
BOOST_CHECK_EQUAL( value, unpacked );
trx.messages[0].type = "transfer";
trx.messages[0].code = config::EosContractName;
trx.setMessage(0, "transfer", trans);
auto unpack_trans = trx.messageAs<types::transfer>(0);
......@@ -140,7 +141,7 @@ BOOST_FIXTURE_TEST_CASE(producer_creation, testing_fixture)
}
Make_Key(signing);
Update_Producer(chain, producer, signing_public_key);
Update_Producer(chain, "producer", signing_public_key);
auto& producer = chain.get_producer("producer");
BOOST_CHECK_EQUAL(producer.signing_key, signing_public_key);
} FC_LOG_AND_RETHROW() }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册