adding description field to asset options

This commit is contained in:
Daniel Larimer 2015-06-19 16:13:32 -04:00
parent 3d29b29e50
commit 7dd2a6dff5
2 changed files with 8 additions and 1 deletions

View file

@ -156,6 +156,11 @@ namespace graphene { namespace chain {
/** defines the assets that this asset may not be traded against in the market, must not overlap whitelist */ /** defines the assets that this asset may not be traded against in the market, must not overlap whitelist */
flat_set<asset_id_type> blacklist_markets; flat_set<asset_id_type> blacklist_markets;
/** data that describes the meaning/purpose of this asset, fee will be charged proportional to
* size of description.
*/
string description;
/// Perform internal consistency checks. /// Perform internal consistency checks.
/// @throws fc::exception if any check fails /// @throws fc::exception if any check fails
void validate()const; void validate()const;
@ -323,6 +328,7 @@ FC_REFLECT( graphene::chain::asset_object::asset_options,
(blacklist_authorities) (blacklist_authorities)
(whitelist_markets) (whitelist_markets)
(blacklist_markets) (blacklist_markets)
(description)
) )
FC_REFLECT( graphene::chain::asset_object::bitasset_options, FC_REFLECT( graphene::chain::asset_object::bitasset_options,
(feed_lifetime_sec) (feed_lifetime_sec)

View file

@ -162,6 +162,7 @@ share_type asset_create_operation::calculate_fee( const fee_schedule_type& sched
uint32_t s = symbol.size(); uint32_t s = symbol.size();
while( s <= 6 ) { core_fee_required *= 30; ++s; } while( s <= 6 ) { core_fee_required *= 30; ++s; }
core_fee_required += ((fc::raw::pack_size(*this)*schedule.data_fee)/1024);
return core_fee_required; return core_fee_required;
} }
@ -288,7 +289,7 @@ void asset_update_operation::validate()const
share_type asset_update_operation::calculate_fee( const fee_schedule_type& k )const share_type asset_update_operation::calculate_fee( const fee_schedule_type& k )const
{ {
return k.asset_update_fee; return k.asset_update_fee + ((fc::raw::pack_size(*this)*k.data_fee)/1024);
} }
void asset_burn_operation::get_required_auth(flat_set<account_id_type>& active_auth_set, flat_set<account_id_type>&) const void asset_burn_operation::get_required_auth(flat_set<account_id_type>& active_auth_set, flat_set<account_id_type>&) const