Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
fed461e2
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,发现更多精彩内容 >>
提交
fed461e2
编写于
2月 16, 2018
作者:
C
Ciju John
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move method to child. Remove redundant constructor argument.
上级
2b005cba
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
7 deletion
+10
-7
libraries/testing/include/eosio/testing/tester.hpp
libraries/testing/include/eosio/testing/tester.hpp
+2
-1
libraries/testing/tester.cpp
libraries/testing/tester.cpp
+7
-5
tests/chain_tests/block_tests.cpp
tests/chain_tests/block_tests.cpp
+1
-1
未找到文件。
libraries/testing/include/eosio/testing/tester.hpp
浏览文件 @
fed461e2
...
@@ -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
();
};
};
/**
/**
...
...
libraries/testing/tester.cpp
浏览文件 @
fed461e2
...
@@ -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
tests/chain_tests/block_tests.cpp
浏览文件 @
fed461e2
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录