Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
2e57bfcf
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,发现更多精彩内容 >>
提交
2e57bfcf
编写于
11月 01, 2017
作者:
B
Brian Johnson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed test code that shouldn't have been committed.
上级
8168af7e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
7 deletion
+0
-7
libraries/chain/chain_controller.cpp
libraries/chain/chain_controller.cpp
+0
-6
libraries/chain/include/eos/chain/chain_controller.hpp
libraries/chain/include/eos/chain/chain_controller.hpp
+0
-1
未找到文件。
libraries/chain/chain_controller.cpp
浏览文件 @
2e57bfcf
...
...
@@ -39,7 +39,6 @@
#include <chrono>
namespace
eos
{
namespace
chain
{
bool
chain_controller
::
test
=
false
;
bool
chain_controller
::
is_known_block
(
const
block_id_type
&
id
)
const
{
return
_fork_db
.
is_known_block
(
id
)
||
_block_log
.
read_block_by_id
(
id
);
...
...
@@ -907,7 +906,6 @@ uint32_t chain_controller::_transaction_message_rate(const fc::time_point_sec& n
void
chain_controller
::
rate_limit_message
(
const
Message
&
message
)
{
try
{
const
auto
now
=
head_block_time
();
if
(
chain_controller
::
test
)
wlog
(
"rate limit for ${a} ${t}"
,(
"a"
,
message
.
code
)(
"t"
,
now
.
sec_since_epoch
()));
// per authorization rate limiting
for
(
const
auto
&
permission
:
message
.
authorization
)
...
...
@@ -915,7 +913,6 @@ void chain_controller::rate_limit_message(const Message& message)
auto
rate_limiting
=
_db
.
find
<
rate_limiting_object
,
by_name
>
(
permission
.
account
);
if
(
rate_limiting
==
nullptr
)
{
if
(
chain_controller
::
test
)
wlog
(
"create auth ${a} ${t}"
,(
"a"
,
permission
.
account
)(
"t"
,
now
.
sec_since_epoch
()));
_db
.
create
<
rate_limiting_object
>
([
&
](
rate_limiting_object
&
rlo
)
{
rlo
.
name
=
permission
.
account
;
rlo
.
per_auth_account_txn_msg_rate
=
1
;
...
...
@@ -924,7 +921,6 @@ void chain_controller::rate_limit_message(const Message& message)
}
else
{
if
(
chain_controller
::
test
)
wlog
(
"modify auth ${a} ${t} ${mr}"
,(
"a"
,
permission
.
account
)(
"t"
,
now
.
sec_since_epoch
())(
"mr"
,
rate_limiting
->
per_auth_account_txn_msg_rate
));
const
auto
message_rate
=
_transaction_message_rate
(
now
,
rate_limiting
->
per_auth_account_last_update_sec
,
_per_auth_account_txn_msg_rate_limit_time_frame_sec
,
_per_auth_account_txn_msg_rate_limit
,
rate_limiting
->
per_auth_account_txn_msg_rate
,
authorization_account
,
permission
.
account
);
...
...
@@ -939,7 +935,6 @@ void chain_controller::rate_limit_message(const Message& message)
auto
rate_limiting
=
_db
.
find
<
rate_limiting_object
,
by_name
>
(
message
.
code
);
if
(
rate_limiting
==
nullptr
)
{
if
(
chain_controller
::
test
)
wlog
(
"create code ${a} ${t}"
,(
"a"
,
message
.
code
)(
"t"
,
now
.
sec_since_epoch
()));
_db
.
create
<
rate_limiting_object
>
([
&
](
rate_limiting_object
&
rlo
)
{
rlo
.
name
=
message
.
code
;
rlo
.
per_code_account_txn_msg_rate
=
1
;
...
...
@@ -948,7 +943,6 @@ void chain_controller::rate_limit_message(const Message& message)
}
else
{
if
(
chain_controller
::
test
)
wlog
(
"modify code ${a} ${t} ${mr}"
,(
"a"
,
message
.
code
)(
"t"
,
now
.
sec_since_epoch
())(
"mr"
,
rate_limiting
->
per_code_account_txn_msg_rate
));
const
auto
message_rate
=
_transaction_message_rate
(
now
,
rate_limiting
->
per_code_account_last_update_sec
,
_per_code_account_txn_msg_rate_limit_time_frame_sec
,
_per_code_account_txn_msg_rate_limit
,
rate_limiting
->
per_code_account_txn_msg_rate
,
code_account
,
message
.
code
);
...
...
libraries/chain/include/eos/chain/chain_controller.hpp
浏览文件 @
2e57bfcf
...
...
@@ -36,7 +36,6 @@ namespace eos { namespace chain {
*/
class
chain_controller
{
public:
static
bool
test
;
struct
txn_msg_rate_limits
;
chain_controller
(
database
&
database
,
fork_database
&
fork_db
,
block_log
&
blocklog
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录