Skip to content

Commit

Permalink
Small Changes to Hardfork
Browse files Browse the repository at this point in the history
1. no voting after first cashout
2. no discussion rewards at this time (require more discussion)
3. update version number
  • Loading branch information
bytemaster committed Jun 29, 2016
1 parent a90b5df commit 914c840
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion libraries/chain/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,7 @@ void database::cashout_comment_helper( const comment_object& comment )
share_type author_tokens = reward_tokens.to_uint64() - discussion_tokens - curation_tokens;

author_tokens += pay_curators( comment, curation_tokens );

if( discussion_tokens > 0 )
author_tokens += pay_discussions( comment, discussion_tokens );

Expand Down Expand Up @@ -2054,10 +2055,12 @@ uint16_t database::get_activity_rewards_percent() const

uint16_t database::get_discussion_rewards_percent() const
{
/*
if( has_hardfork( STEEMIT_HARDFORK_0_8__116 ) )
return STEEMIT_1_PERCENT * 25;
else
return 0;
*/
return 0;
}

uint16_t database::get_curation_rewards_percent() const
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/include/steemit/chain/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
#pragma once

#define STEEMIT_BLOCKCHAIN_VERSION ( version(0, 8, 1) )
#define STEEMIT_BLOCKCHAIN_VERSION ( version(0, 8, 2) )
#define STEEMIT_BLOCKCHAIN_HARDFORK_VERSION ( hardfork_version( STEEMIT_BLOCKCHAIN_VERSION ) )

#ifdef IS_TEST_NET
Expand Down
5 changes: 4 additions & 1 deletion libraries/chain/steem_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@ void vote_evaluator::do_apply( const vote_operation& o )
const auto& comment = db().get_comment( o.author, o.permlink );
const auto& voter = db().get_account( o.voter );

/// no new votes after payout
FC_ASSERT( comment.last_payout == fc::time_point_sec() );

if( o.weight > 0 ) FC_ASSERT( comment.allow_votes );

const auto& comment_vote_idx = db().get_index_type< comment_vote_index >().indices().get< by_comment_voter >();
Expand Down Expand Up @@ -780,7 +783,7 @@ void vote_evaluator::do_apply( const vote_operation& o )
cv.vote_percent = o.weight;
cv.last_update = db().head_block_time();

if( rshares > 0 && comment.last_payout.sec_since_epoch() == 0 && comment.allow_curation_rewards )
if( rshares > 0 && (comment.last_payout == fc::time_point_sec()) && comment.allow_curation_rewards )
{
// cv.weight = W(R_1) - W(R_0)
if( db().has_hardfork( STEEMIT_HARDFORK_0_1 ) )
Expand Down

0 comments on commit 914c840

Please sign in to comment.