Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
83361e6e
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
83361e6e
编写于
4月 24, 2018
作者:
K
Kevin Heifner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove current_sender from tests
上级
d0f75338
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
3 addition
and
19 deletion
+3
-19
contracts/eosio.system/eosio.system.hpp
contracts/eosio.system/eosio.system.hpp
+2
-1
contracts/eosiolib/action.h
contracts/eosiolib/action.h
+0
-7
contracts/test_api/test_action.cpp
contracts/test_api/test_action.cpp
+0
-6
contracts/test_api/test_api.cpp
contracts/test_api/test_api.cpp
+0
-1
contracts/test_api/test_api.hpp
contracts/test_api/test_api.hpp
+0
-1
unittests/bootseq_tests.cpp
unittests/bootseq_tests.cpp
+1
-3
未找到文件。
contracts/eosio.system/eosio.system.hpp
浏览文件 @
83361e6e
...
...
@@ -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"
);
...
...
contracts/eosiolib/action.h
浏览文件 @
83361e6e
...
...
@@ -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
...
...
contracts/test_api/test_action.cpp
浏览文件 @
83361e6e
...
...
@@ -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
));
...
...
contracts/test_api/test_api.cpp
浏览文件 @
83361e6e
...
...
@@ -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
...
...
contracts/test_api/test_api.hpp
浏览文件 @
83361e6e
...
...
@@ -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
();
};
...
...
tests/chain_
tests/bootseq_tests.cpp
→
unit
tests/bootseq_tests.cpp
浏览文件 @
83361e6e
#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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录