Skip to content

Commit

Permalink
Update hf date and minor cleanup #551
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vandeberg committed Nov 18, 2016
1 parent 87e40d0 commit be9f160
Show file tree
Hide file tree
Showing 3 changed files with 6 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 @@ -2126,9 +2126,12 @@ void database::process_funds()
/**
* At block 7,000,000 have a 9.5% instantaneous inflation rate, decreasing to 0.95% at a rate of 0.01%
* every 250k blocks. This narrowing will take approximately 20.5 years and will complete on block 220,750,000
*
* Using signed 64 bit integer, we don't have to worry about subtraction underflow until the year 224,020,500,263,646,647
* assuming there are no missed blocks.
*/
auto new_steem = ( props.virtual_supply.amount *
std::max( (uint32_t)( STEEMIT_INFLATION_RATE_START_PERCENT - head_block_num() / STEEMIT_INFLATION_NARROWING_PERIOD ), (uint32_t)STEEMIT_INFLATION_RATE_STOP_PERCENT ) )
std::max( (int64_t)( STEEMIT_INFLATION_RATE_START_PERCENT - head_block_num() / STEEMIT_INFLATION_NARROWING_PERIOD ), (int64_t)STEEMIT_INFLATION_RATE_STOP_PERCENT ) )
/ ( STEEMIT_100_PERCENT * STEEMIT_BLOCKS_PER_YEAR );
auto content_reward = ( new_steem * STEEMIT_CONTENT_REWARD_PERCENT ) / STEEMIT_100_PERCENT; /// 75% to content creator
auto vesting_reward = ( new_steem * STEEMIT_VESTING_FUND_PERCENT ) / STEEMIT_100_PERCENT; /// 15% to vesting fund
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/hardfork.d/0_16.hf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define STEEMIT_HARDFORK_0_16 16
#define STEEMIT_HARDFORK_0_16__551 (STEEMIT_HARDFORK_0_16)

#define STEEMIT_HARDFORK_0_16_TIME 1480435200 // Tue, 29 Nov 2016 16:00:00 UTC (11:00:00 EST)
#define STEEMIT_HARDFORK_0_16_TIME 1481040000 // Tue, 6 Dec 2016 16:00:00 UTC (11:00:00 EST)

#define STEEMIT_HARDFORK_0_16_VERSION hardfork_version( 0, 16 )

Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/steem_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ void convert_evaluator::do_apply( const convert_operation& o )

auto steemit_conversion_delay = STEEMIT_CONVERSION_DELAY_PRE_HF_16;
if( db().has_hardfork( STEEMIT_HARDFORK_0_16__551) )
steemit_conversion_delay = fc::microseconds( STEEMIT_CONVERSION_DELAY );
steemit_conversion_delay = STEEMIT_CONVERSION_DELAY;

db().create<convert_request_object>( [&]( convert_request_object& obj )
{
Expand Down

0 comments on commit be9f160

Please sign in to comment.