Removed hardfork code for CORE_429
This commit is contained in:
parent
4b0579b475
commit
e75f18ba57
3 changed files with 1 additions and 16 deletions
|
|
@ -128,20 +128,11 @@ void asset_create_evaluator::pay_fee()
|
||||||
|
|
||||||
object_id_type asset_create_evaluator::do_apply( const asset_create_operation& op )
|
object_id_type asset_create_evaluator::do_apply( const asset_create_operation& op )
|
||||||
{ try {
|
{ try {
|
||||||
bool hf_429 = fee_is_odd && db().head_block_time() > HARDFORK_CORE_429_TIME;
|
|
||||||
|
|
||||||
const asset_dynamic_data_object& dyn_asset =
|
const asset_dynamic_data_object& dyn_asset =
|
||||||
db().create<asset_dynamic_data_object>( [&]( asset_dynamic_data_object& a ) {
|
db().create<asset_dynamic_data_object>( [&]( asset_dynamic_data_object& a ) {
|
||||||
a.current_supply = 0;
|
a.current_supply = 0;
|
||||||
a.fee_pool = core_fee_paid - (hf_429 ? 1 : 0);
|
a.fee_pool = core_fee_paid - (fee_is_odd ? 1 : 0);
|
||||||
});
|
});
|
||||||
if( fee_is_odd && !hf_429 )
|
|
||||||
{
|
|
||||||
const auto& core_dd = db().get<asset_object>( asset_id_type() ).dynamic_data( db() );
|
|
||||||
db().modify( core_dd, [=]( asset_dynamic_data_object& dd ) {
|
|
||||||
dd.current_supply++;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
asset_bitasset_data_id_type bit_asset_id;
|
asset_bitasset_data_id_type bit_asset_id;
|
||||||
if( op.bitasset_opts.valid() )
|
if( op.bitasset_opts.valid() )
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
// bitshares-core #429 rounding issue when creating assets
|
|
||||||
#ifndef HARDFORK_CORE_429_TIME
|
|
||||||
#define HARDFORK_CORE_429_TIME (fc::time_point_sec( 1511793600 ))
|
|
||||||
#endif
|
|
||||||
|
|
@ -991,8 +991,6 @@ BOOST_AUTO_TEST_CASE( issue_429_test )
|
||||||
|
|
||||||
verify_asset_supplies( db );
|
verify_asset_supplies( db );
|
||||||
|
|
||||||
generate_blocks( HARDFORK_CORE_429_TIME + 10 );
|
|
||||||
|
|
||||||
{
|
{
|
||||||
signed_transaction tx;
|
signed_transaction tx;
|
||||||
asset_create_operation op;
|
asset_create_operation op;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue