提交 0975926f 编写于 作者: A arhag

Merge branch 'master' into write-genesis-to-block-log

......@@ -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
......
......@@ -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.66.0/source/boost_1_66_0.tar.bz2 -O - | tar -xj \
&& cd boost_1_66_0 \
RUN wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2 -O - | tar -xj \
&& cd boost_1_67_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_66_0
&& cd .. && rm -rf boost_1_67_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 \
......
......@@ -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
......
......@@ -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 };
......
Subproject commit e2a2e74e456413f5d6e6439d4918d1b417ede1c3
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册