Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #405 from EOSIO/merge-release-1.8.2-to-master
Browse files Browse the repository at this point in the history
Version 1.8.2
  • Loading branch information
arhag authored Dec 2, 2019
2 parents 897d88c + 85b3ff4 commit 79f63ad
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(eosio_contracts)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 8)
set(VERSION_PATCH 1)
set(VERSION_PATCH 2)
#set(VERSION_SUFFIX develop)

if (VERSION_SUFFIX)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eosio.contracts

## Version : 1.8.1
## Version : 1.8.2

The design of the EOSIO blockchain calls for a number of smart contracts that are run at a privileged permission level in order to support functions such as block producer registration and voting, token staking for CPU and network bandwidth, RAM purchasing, multi-sig, etc. These smart contracts are referred to as the bios, system, msig, wrap (formerly known as sudo) and token contracts.

Expand Down
2 changes: 1 addition & 1 deletion contracts/eosio.system/src/delegate_bandwidth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ namespace eosiosystem {
check( unstake_cpu_quantity >= zero_asset, "must unstake a positive amount" );
check( unstake_net_quantity >= zero_asset, "must unstake a positive amount" );
check( unstake_cpu_quantity.amount + unstake_net_quantity.amount > 0, "must unstake a positive amount" );
check( _gstate.total_activated_stake >= min_activated_stake,
check( _gstate.thresh_activated_stake_time != time_point(),
"cannot undelegate bandwidth until the chain is activated (at least 15% of all tokens participate in voting)" );

changebw( from, receiver, -unstake_net_quantity, -unstake_cpu_quantity, false);
Expand Down
6 changes: 3 additions & 3 deletions contracts/eosio.system/src/producer_pay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace eosiosystem {
// is eventually completely removed, at which point this line can be removed.
_gstate2.last_block_num = timestamp;

/** until activated stake crosses this threshold no new rewards are paid */
if( _gstate.total_activated_stake < min_activated_stake )
/** until activation, no new rewards are paid */
if( _gstate.thresh_activated_stake_time == time_point() )
return;

if( _gstate.last_pervote_bucket_fill == time_point() ) /// start the presses
Expand Down Expand Up @@ -71,7 +71,7 @@ namespace eosiosystem {
const auto& prod = _producers.get( owner.value );
check( prod.active(), "producer does not have an active key" );

check( _gstate.total_activated_stake >= min_activated_stake,
check( _gstate.thresh_activated_stake_time != time_point(),
"cannot claim rewards until the chain is activated (at least 15% of all tokens participate in voting)" );

const auto ct = current_time_point();
Expand Down
8 changes: 4 additions & 4 deletions contracts/eosio.system/src/voting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ namespace eosiosystem {
check( !proxy || !voter->is_proxy, "account registered as a proxy is not allowed to use a proxy" );

/**
* The first time someone votes we calculate and set last_vote_weight, since they cannot unstake until
* after total_activated_stake hits threshold, we can use last_vote_weight to determine that this is
* The first time someone votes we calculate and set last_vote_weight. Since they cannot unstake until
* after the chain has been activated, we can use last_vote_weight to determine that this is
* their first vote and should consider their stake activated.
*/
if( voter->last_vote_weight <= 0.0 ) {
if( _gstate.thresh_activated_stake_time == time_point() && voter->last_vote_weight <= 0.0 ) {
_gstate.total_activated_stake += voter->staked;
if( _gstate.total_activated_stake >= min_activated_stake && _gstate.thresh_activated_stake_time == time_point() ) {
if( _gstate.total_activated_stake >= min_activated_stake ) {
_gstate.thresh_activated_stake_time = current_time_point();
}
}
Expand Down

0 comments on commit 79f63ad

Please sign in to comment.