Merge branch 'feature/hf-btc-flags-change' into 'develop'
Feature/hf btc flags change See merge request PBSA/peerplays!14
This commit is contained in:
commit
652d37e206
2 changed files with 21 additions and 0 deletions
|
|
@ -1939,6 +1939,21 @@ void database::perform_son_tasks()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void update_son_asset(database& db)
|
||||||
|
{
|
||||||
|
if( db.head_block_time() >= HARDFORK_NEXT_TIME )
|
||||||
|
{
|
||||||
|
const auto& gpo = db.get_global_properties();
|
||||||
|
const asset_object& btc_asset = gpo.parameters.btc_asset()(db);
|
||||||
|
if( btc_asset.is_transfer_restricted() ) {
|
||||||
|
db.modify( btc_asset, []( asset_object& ao ) {
|
||||||
|
ao.options.flags = asset_issuer_permission_flags::charge_market_fee |
|
||||||
|
asset_issuer_permission_flags::override_authority;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void database::perform_chain_maintenance(const signed_block& next_block, const global_property_object& global_props)
|
void database::perform_chain_maintenance(const signed_block& next_block, const global_property_object& global_props)
|
||||||
{ try {
|
{ try {
|
||||||
const auto& gpo = get_global_properties();
|
const auto& gpo = get_global_properties();
|
||||||
|
|
@ -1950,6 +1965,8 @@ void database::perform_chain_maintenance(const signed_block& next_block, const g
|
||||||
|
|
||||||
rolling_period_start(*this);
|
rolling_period_start(*this);
|
||||||
|
|
||||||
|
update_son_asset(*this);
|
||||||
|
|
||||||
struct vote_tally_helper {
|
struct vote_tally_helper {
|
||||||
database& d;
|
database& d;
|
||||||
const global_property_object& props;
|
const global_property_object& props;
|
||||||
|
|
|
||||||
4
libraries/chain/hardfork.d/NEXT.hf
Normal file
4
libraries/chain/hardfork.d/NEXT.hf
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
// NEXT HARDFORK Wednesday, March 17, 2021 23:00:00 GMT
|
||||||
|
#ifndef HARDFORK_NEXT_TIME
|
||||||
|
#define HARDFORK_NEXT_TIME (fc::time_point_sec( 1615982400 ))
|
||||||
|
#endif
|
||||||
Loading…
Reference in a new issue