Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
4a2746e0
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,发现更多精彩内容 >>
未验证
提交
4a2746e0
编写于
4月 26, 2018
作者:
K
Kevin Heifner
提交者:
GitHub
4月 26, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2607 from EOSIO/fix-delete_auth_test
delete_auth_test should use eosio.token contract not currency
上级
6a55ecf2
d119479e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
18 addition
and
18 deletion
+18
-18
tests/chain_tests/delay_tests.cpp
tests/chain_tests/delay_tests.cpp
+18
-18
未找到文件。
tests/chain_tests/delay_tests.cpp
浏览文件 @
4a2746e0
...
...
@@ -176,11 +176,11 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
chain
.
set_abi
(
config
::
system_account_name
,
eosio_system_abi
);
chain
.
produce_blocks
();
chain
.
create_account
(
N
(
currency
));
chain
.
create_account
(
N
(
eosio
.
token
));
chain
.
produce_blocks
(
10
);
chain
.
set_code
(
N
(
currency
),
currency
_wast
);
chain
.
set_abi
(
N
(
currency
),
currency
_abi
);
chain
.
set_code
(
N
(
eosio
.
token
),
eosio_token
_wast
);
chain
.
set_abi
(
N
(
eosio
.
token
),
eosio_token
_abi
);
chain
.
produce_blocks
();
chain
.
create_account
(
N
(
tester
));
...
...
@@ -212,30 +212,30 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
// link auth
chain
.
push_action
(
config
::
system_account_name
,
contracts
::
linkauth
::
get_name
(),
tester_account
,
fc
::
mutable_variant_object
()
(
"account"
,
"tester"
)
(
"code"
,
"
currency
"
)
(
"code"
,
"
eosio.token
"
)
(
"type"
,
"transfer"
)
(
"requirement"
,
"first"
));
// create
currency
// create
CUR token
chain
.
produce_blocks
();
chain
.
push_action
(
N
(
currency
),
N
(
create
),
N
(
currency
),
mutable_variant_object
()
(
"issuer"
,
"
currency
"
)
chain
.
push_action
(
N
(
eosio
.
token
),
N
(
create
),
N
(
eosio
.
token
),
mutable_variant_object
()
(
"issuer"
,
"
eosio.token
"
)
(
"maximum_supply"
,
"9000000.0000 CUR"
)
(
"can_freeze"
,
0
)
(
"can_recall"
,
0
)
(
"can_whitelist"
,
0
)
);
// issue to account "
currency
"
chain
.
push_action
(
N
(
currency
),
name
(
"issue"
),
N
(
currency
),
fc
::
mutable_variant_object
()
(
"to"
,
"
currency
"
)
// issue to account "
eosio.token
"
chain
.
push_action
(
N
(
eosio
.
token
),
name
(
"issue"
),
N
(
eosio
.
token
),
fc
::
mutable_variant_object
()
(
"to"
,
"
eosio.token
"
)
(
"quantity"
,
"1000000.0000 CUR"
)
(
"memo"
,
"for stuff"
)
);
// transfer from
currency
to tester
trace
=
chain
.
push_action
(
N
(
currency
),
name
(
"transfer"
),
N
(
currency
),
fc
::
mutable_variant_object
()
(
"from"
,
"
currency
"
)
// transfer from
eosio.token
to tester
trace
=
chain
.
push_action
(
N
(
eosio
.
token
),
name
(
"transfer"
),
N
(
eosio
.
token
),
fc
::
mutable_variant_object
()
(
"from"
,
"
eosio.token
"
)
(
"to"
,
"tester"
)
(
"quantity"
,
"100.0000 CUR"
)
(
"memo"
,
"hi"
)
...
...
@@ -245,12 +245,12 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
chain
.
produce_blocks
();
auto
liquid_balance
=
get_currency_balance
(
chain
,
N
(
currency
));
auto
liquid_balance
=
get_currency_balance
(
chain
,
N
(
eosio
.
token
));
BOOST_REQUIRE_EQUAL
(
asset
::
from_string
(
"999900.0000 CUR"
),
liquid_balance
);
liquid_balance
=
get_currency_balance
(
chain
,
N
(
tester
));
BOOST_REQUIRE_EQUAL
(
asset
::
from_string
(
"100.0000 CUR"
),
liquid_balance
);
trace
=
chain
.
push_action
(
N
(
currency
),
name
(
"transfer"
),
N
(
tester
),
fc
::
mutable_variant_object
()
trace
=
chain
.
push_action
(
N
(
eosio
.
token
),
name
(
"transfer"
),
N
(
tester
),
fc
::
mutable_variant_object
()
(
"from"
,
"tester"
)
(
"to"
,
"tester2"
)
(
"quantity"
,
"1.0000 CUR"
)
...
...
@@ -259,7 +259,7 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
BOOST_REQUIRE_EQUAL
(
transaction_receipt
::
executed
,
trace
.
status
);
liquid_balance
=
get_currency_balance
(
chain
,
N
(
currency
));
liquid_balance
=
get_currency_balance
(
chain
,
N
(
eosio
.
token
));
BOOST_REQUIRE_EQUAL
(
asset
::
from_string
(
"999900.0000 CUR"
),
liquid_balance
);
liquid_balance
=
get_currency_balance
(
chain
,
N
(
tester
));
BOOST_REQUIRE_EQUAL
(
asset
::
from_string
(
"99.0000 CUR"
),
liquid_balance
);
...
...
@@ -281,7 +281,7 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
// unlink auth
trace
=
chain
.
push_action
(
config
::
system_account_name
,
contracts
::
unlinkauth
::
get_name
(),
tester_account
,
fc
::
mutable_variant_object
()
(
"account"
,
"tester"
)
(
"code"
,
"
currency
"
)
(
"code"
,
"
eosio.token
"
)
(
"type"
,
"transfer"
));
BOOST_REQUIRE_EQUAL
(
transaction_receipt
::
executed
,
trace
.
status
);
...
...
@@ -294,7 +294,7 @@ BOOST_AUTO_TEST_CASE(delete_auth_test) { try {
chain
.
produce_blocks
(
1
);;
trace
=
chain
.
push_action
(
N
(
currency
),
name
(
"transfer"
),
N
(
tester
),
fc
::
mutable_variant_object
()
trace
=
chain
.
push_action
(
N
(
eosio
.
token
),
name
(
"transfer"
),
N
(
tester
),
fc
::
mutable_variant_object
()
(
"from"
,
"tester"
)
(
"to"
,
"tester2"
)
(
"quantity"
,
"3.0000 CUR"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录