Exemple #1
0
void price::validate() const {
    try {
        FC_ASSERT(base.amount > share_type(0));
        FC_ASSERT(quote.amount > share_type(0));
        FC_ASSERT(base.symbol_name() != quote.symbol_name());
    }
    FC_CAPTURE_AND_RETHROW((base)(quote))
}
Exemple #2
0
 share_type        proxied_vsf_votes_total()const {
    return std::accumulate( proxied_vsf_votes.begin(),
                            proxied_vsf_votes.end(),
                            share_type() );
 }
Exemple #3
0
price price::max(asset_symbol_type base, asset_symbol_type quote) {
    return asset(share_type(STEEMIT_MAX_SHARE_SUPPLY), base) /
           asset(share_type(1), quote);
}
const account_object& database_fixture::account_create(
   const string& name,
   const public_key_type& key,
   const public_key_type& post_key
)
{
   try
   {
      return account_create(
         name,
         STEEMIT_INIT_MINER_NAME,
         init_account_priv_key,
         std::max( db.get_witness_schedule_object().median_props.account_creation_fee.amount * STEEMIT_CREATE_ACCOUNT_WITH_STEEM_MODIFIER, share_type( 100 ) ),
         key,
         post_key,
         "" );
   }
   FC_CAPTURE_AND_RETHROW( (name) );
}