提交 83361e6e 编写于 作者: K Kevin Heifner

Remove current_sender from tests

上级 d0f75338
......@@ -112,7 +112,8 @@ namespace eosiosystem {
static void on(const claimrewards& cr) {
require_auth(cr.owner);
eosio_assert(current_sender() == account_name(), "claimrewards can not be part of a deferred transaction");
// TODO: current_sender() removed. Need to determine deferred transaction some other way.
// TODO: eosio_assert(current_sender() == account_name(), "claimrewards can not be part of a deferred transaction");
producers_table producers_tbl(SystemAccount, SystemAccount);
auto prod = producers_tbl.find(cr.owner);
eosio_assert(prod != producers_tbl.end(), "account name is not in producer list");
......
......@@ -141,13 +141,6 @@ extern "C" {
*/
time publication_time();
/**
* Get the account which specifies the sender of the action
* @brief Get the sender of the action
* @return the account which specifies the sender of the action
*/
account_name current_sender();
/**
* Get the current receiver of the action
* @brief Get the current receiver of the action
......
......@@ -179,12 +179,6 @@ void test_action::test_current_receiver(uint64_t receiver, uint64_t code, uint64
eosio_assert( receiver == cur_rec, "the current receiver does not match" );
}
void test_action::test_current_sender() {
account_name cur_send;
read_action_data(&cur_send, sizeof(account_name));
eosio_assert( current_sender() == cur_send, "the current sender does not match" );
}
void test_action::now() {
uint32_t tmp = 0;
uint32_t total = read_action_data(&tmp, sizeof(uint32_t));
......
......@@ -77,7 +77,6 @@ extern "C" {
WASM_TEST_HANDLER(test_action, now);
WASM_TEST_HANDLER(test_action, test_abort);
WASM_TEST_HANDLER_EX(test_action, test_current_receiver);
WASM_TEST_HANDLER(test_action, test_current_sender);
WASM_TEST_HANDLER(test_action, test_publication_time);
// test named actions
......
......@@ -66,7 +66,6 @@ struct test_action {
static void now();
static void test_abort() __attribute__ ((noreturn)) ;
static void test_current_receiver(uint64_t receiver, uint64_t code, uint64_t action);
static void test_current_sender();
static void test_publication_time();
};
......
#include <boost/test/unit_test.hpp>
#include <eosio/testing/tester.hpp>
#include <eosio/chain/abi_serializer.hpp>
#include <eosio/chain_plugin/chain_plugin.hpp>
#include <eosio.system/eosio.system.wast.hpp>
#include <eosio.system/eosio.system.abi.hpp>
......@@ -26,7 +25,6 @@
using namespace eosio;
using namespace eosio::chain;
using namespace eosio::chain::contracts;
using namespace eosio::testing;
using namespace fc;
......@@ -56,7 +54,7 @@ public:
}
bootseq_tester() {
const auto &accnt = control->get_database().get<account_object, by_name>(config::system_account_name);
const auto &accnt = control->db().get<account_object, by_name>(config::system_account_name);
abi_def abi;
BOOST_REQUIRE_EQUAL(abi_serializer::to_abi(accnt.abi, abi), true);
abi_ser.set_abi(abi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册