Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
0975926f
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,发现更多精彩内容 >>
提交
0975926f
编写于
5月 25, 2018
作者:
A
arhag
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into write-genesis-to-block-log
上级
c740baf0
e306198e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
17 deletion
+9
-17
.gitmodules
.gitmodules
+0
-3
Docker/builder/Dockerfile
Docker/builder/Dockerfile
+3
-3
contracts/eosio.system/delegate_bandwidth.cpp
contracts/eosio.system/delegate_bandwidth.cpp
+2
-2
libraries/chain/resource_limits.cpp
libraries/chain/resource_limits.cpp
+4
-8
programs/snapshot
programs/snapshot
+0
-1
未找到文件。
.gitmodules
浏览文件 @
0975926f
...
...
@@ -6,9 +6,6 @@
path = libraries/appbase
url = https://github.com/eosio/appbase
ignore = dirty
[submodule "programs/snapshot"]
path = programs/snapshot
url = https://github.com/EOSIO/genesis.git
[submodule "contracts/musl/upstream"]
path = contracts/musl/upstream
url = https://github.com/EOSIO/musl.git
...
...
Docker/builder/Dockerfile
浏览文件 @
0975926f
...
...
@@ -26,13 +26,13 @@ RUN wget --no-check-certificate https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x
ENV
CC clang
ENV
CXX clang++
RUN
wget https://dl.bintray.com/boostorg/release/1.6
6.0/source/boost_1_66
_0.tar.bz2
-O
- |
tar
-xj
\
&&
cd
boost_1_6
6
_0
\
RUN
wget https://dl.bintray.com/boostorg/release/1.6
7.0/source/boost_1_67
_0.tar.bz2
-O
- |
tar
-xj
\
&&
cd
boost_1_6
7
_0
\
&&
./bootstrap.sh
--prefix
=
/usr/local
\
&&
echo
'using clang : 4.0 : clang++-4.0 ;'
>>
project-config.jam
\
&&
./b2
-d0
-j
$(
nproc
)
--with-thread
--with-date_time
--with-system
--with-filesystem
--with-program_options
\
--with-signals
--with-serialization
--with-chrono
--with-test
--with-context
--with-locale
--with-coroutine
--with-iostreams
toolset
=
clang
link
=
static
install
\
&&
cd
..
&&
rm
-rf
boost_1_6
6
_0
&&
cd
..
&&
rm
-rf
boost_1_6
7
_0
RUN
wget https://github.com/mongodb/mongo-c-driver/releases/download/1.9.3/mongo-c-driver-1.9.3.tar.gz
-O
- |
tar
-xz
\
&&
cd
mongo-c-driver-1.9.3
\
...
...
contracts/eosio.system/delegate_bandwidth.cpp
浏览文件 @
0975926f
...
...
@@ -117,7 +117,7 @@ namespace eosiosystem {
{
payer
,
N
(
eosio
.
ram
),
quant_after_fee
,
std
::
string
(
"buy ram"
)
}
);
}
if
(
fee
.
amount
>
0
)
{
if
(
payer
!=
N
(
eosio
)
&&
fee
.
amount
>
0
)
{
INLINE_ACTION_SENDER
(
eosio
::
token
,
transfer
)(
N
(
eosio
.
token
),
{
payer
,
N
(
active
)},
{
payer
,
N
(
eosio
.
ramfee
),
fee
,
std
::
string
(
"ram fee"
)
}
);
}
...
...
@@ -259,7 +259,7 @@ namespace eosiosystem {
set_resource_limits
(
receiver
,
tot_itr
->
ram_bytes
,
tot_itr
->
net_weight
.
amount
,
tot_itr
->
cpu_weight
.
amount
);
if
(
tot_itr
->
net_weight
==
asset
(
0
)
&&
tot_itr
->
cpu_weight
==
asset
(
0
)
)
{
if
(
tot_itr
->
net_weight
==
asset
(
0
)
&&
tot_itr
->
cpu_weight
==
asset
(
0
)
&&
tot_itr
->
ram_bytes
==
0
)
{
totals_tbl
.
erase
(
tot_itr
);
}
}
// tot_itr can be invalid, should go out of scope
...
...
libraries/chain/resource_limits.cpp
浏览文件 @
0975926f
...
...
@@ -396,9 +396,8 @@ account_resource_limit resource_limits_manager::get_account_cpu_limit_ex( const
const
auto
&
state
=
_db
.
get
<
resource_limits_state_object
>
();
const
auto
&
usage
=
_db
.
get
<
resource_usage_object
,
by_owner
>
(
name
);
int64_t
x
;
int64_t
cpu_weight
;
get_account_limits
(
name
,
x
,
x
,
cpu_weight
);
int64_t
cpu_weight
,
x
,
y
;
get_account_limits
(
name
,
x
,
y
,
cpu_weight
);
if
(
cpu_weight
<
0
||
state
.
total_cpu_weight
==
0
)
{
return
{
-
1
,
-
1
,
-
1
};
...
...
@@ -412,8 +411,6 @@ account_resource_limit resource_limits_manager::get_account_cpu_limit_ex( const
uint128_t
user_weight
=
cpu_weight
;
uint128_t
all_user_weight
=
state
.
total_cpu_weight
;
wdump
((
cpu_weight
));
auto
max_user_use_in_window
=
(
uint128_t
(
virtual_cpu_capacity_in_window
)
*
user_weight
)
/
all_user_weight
;
auto
cpu_used_in_window
=
(
usage
.
cpu_usage
.
value_ex
*
window_size
)
/
config
::
rate_limiting_precision
;
...
...
@@ -460,9 +457,8 @@ account_resource_limit resource_limits_manager::get_account_net_limit_ex( const
const
auto
&
state
=
_db
.
get
<
resource_limits_state_object
>
();
const
auto
&
usage
=
_db
.
get
<
resource_usage_object
,
by_owner
>
(
name
);
int64_t
x
;
int64_t
net_weight
;
get_account_limits
(
name
,
x
,
net_weight
,
x
);
int64_t
net_weight
,
x
,
y
;
get_account_limits
(
name
,
x
,
net_weight
,
y
);
if
(
net_weight
<
0
||
state
.
total_net_weight
==
0
)
{
return
{
-
1
,
-
1
,
-
1
};
...
...
snapshot
@
e2a2e74e
比较
e2a2e74e
...
e2a2e74e
Subproject commit e2a2e74e456413f5d6e6439d4918d1b417ede1c3
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录