BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
account_evaluator.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 
31 #include <graphene/chain/hardfork.hpp>
37 
38 #include <algorithm>
39 
40 namespace graphene { namespace chain {
41 
42 void verify_authority_accounts( const database& db, const authority& a )
43 {
44  const auto& chain_params = db.get_global_properties().parameters;
46  a.num_auths() <= chain_params.maximum_authority_membership,
47  internal_verify_auth_max_auth_exceeded,
48  "Maximum authority membership exceeded" );
49  for( const auto& acnt : a.account_auths )
50  {
51  GRAPHENE_ASSERT( db.find( acnt.first ) != nullptr,
52  internal_verify_auth_account_not_found,
53  "Account ${a} specified in authority does not exist",
54  ("a", acnt.first) );
55  }
56 }
57 
58 void verify_account_votes( const database& db, const account_options& options )
59 {
60  // ensure account's votes satisfy requirements
61  // NB only the part of vote checking that requires chain state is here,
62  // the rest occurs in account_options::validate()
63 
64  const auto& gpo = db.get_global_properties();
65  const auto& chain_params = gpo.parameters;
66 
67  FC_ASSERT( options.num_witness <= chain_params.maximum_witness_count,
68  "Voted for more witnesses than currently allowed (${c})", ("c", chain_params.maximum_witness_count) );
69  FC_ASSERT( options.num_committee <= chain_params.maximum_committee_count,
70  "Voted for more committee members than currently allowed (${c})", ("c", chain_params.maximum_committee_count) );
71 
72  FC_ASSERT( db.find(options.voting_account), "Invalid proxy account specified." );
73 
74  uint32_t max_vote_id = gpo.next_available_vote_id;
75  bool has_worker_votes = false;
76  for( auto id : options.votes )
77  {
78  FC_ASSERT( id < max_vote_id, "Can not vote for ${id} which does not exist.", ("id",id) );
79  if( id.type() == vote_id_type::worker )
80  has_worker_votes = true;
81  }
82 
83  if( has_worker_votes && (db.head_block_time() >= HARDFORK_607_TIME) )
84  {
85  const auto& against_worker_idx = db.get_index_type<worker_index>().indices().get<by_vote_against>();
86  for( auto id : options.votes )
87  {
88  if( id.type() == vote_id_type::worker )
89  {
90  FC_ASSERT( against_worker_idx.find( id ) == against_worker_idx.end(),
91  "Can no longer vote against a worker." );
92  }
93  }
94  }
95  if ( db.head_block_time() >= HARDFORK_CORE_143_TIME ) {
96  const auto& approve_worker_idx = db.get_index_type<worker_index>().indices().get<by_vote_for>();
97  const auto& committee_idx = db.get_index_type<committee_member_index>().indices().get<by_vote_id>();
98  const auto& witness_idx = db.get_index_type<witness_index>().indices().get<by_vote_id>();
99  for ( auto id : options.votes ) {
100  switch ( id.type() ) {
102  FC_ASSERT( committee_idx.find(id) != committee_idx.end(),
103  "Can not vote for ${id} which does not exist.", ("id",id) );
104  break;
106  FC_ASSERT( witness_idx.find(id) != witness_idx.end(),
107  "Can not vote for ${id} which does not exist.", ("id",id) );
108  break;
110  FC_ASSERT( approve_worker_idx.find( id ) != approve_worker_idx.end(),
111  "Can not vote for ${id} which does not exist.", ("id",id) );
112  break;
113  default:
114  FC_THROW( "Invalid Vote Type: ${id}", ("id", id) );
115  break;
116  }
117  }
118  }
119 }
120 
122 { try {
123  database& d = db();
124 
125  FC_ASSERT( fee_paying_account->is_lifetime_member(), "Only Lifetime members may register an account." );
126  FC_ASSERT( op.referrer(d).is_member(d.head_block_time()), "The referrer must be either a lifetime or annual subscriber." );
127 
128  try
129  {
132  }
133  GRAPHENE_RECODE_EXC( internal_verify_auth_max_auth_exceeded, account_create_max_auth_exceeded )
134  GRAPHENE_RECODE_EXC( internal_verify_auth_account_not_found, account_create_auth_account_not_found )
135 
136  if( op.extensions.value.owner_special_authority.valid() )
137  evaluate_special_authority( d, *op.extensions.value.owner_special_authority );
138  if( op.extensions.value.active_special_authority.valid() )
139  evaluate_special_authority( d, *op.extensions.value.active_special_authority );
140  if( op.extensions.value.buyback_options.valid() )
141  evaluate_buyback_account_options( d, *op.extensions.value.buyback_options );
142  verify_account_votes( d, op.options );
143 
144  auto& acnt_indx = d.get_index_type<account_index>();
145  if( op.name.size() )
146  {
147  auto current_account_itr = acnt_indx.indices().get<by_name>().find( op.name );
148  FC_ASSERT( current_account_itr == acnt_indx.indices().get<by_name>().end(),
149  "Account '${a}' already exists.", ("a",op.name) );
150  }
151 
152  return void_result();
153 } FC_CAPTURE_AND_RETHROW( (op) ) }
154 
156 { try {
157 
158  database& d = db();
159  uint16_t referrer_percent = o.referrer_percent;
160  bool has_small_percent = (
161  (db().head_block_time() <= HARDFORK_453_TIME)
162  && (o.referrer != o.registrar )
163  && (o.referrer_percent != 0 )
164  && (o.referrer_percent <= 0x100)
165  );
166 
167  if( has_small_percent )
168  {
169  if( referrer_percent >= 100 )
170  {
171  wlog( "between 100% and 0x100%: ${o}", ("o", o) );
172  }
173  referrer_percent = referrer_percent*100;
174  if( referrer_percent > GRAPHENE_100_PERCENT )
175  referrer_percent = GRAPHENE_100_PERCENT;
176  }
177 
178  const auto& global_properties = d.get_global_properties();
179 
180  const auto& new_acnt_object = d.create<account_object>( [&o,&d,&global_properties,referrer_percent]
181  ( account_object& obj )
182  {
183  obj.registrar = o.registrar;
184  obj.referrer = o.referrer;
185  obj.lifetime_referrer = o.referrer(d).lifetime_referrer;
186 
187  const auto& params = global_properties.parameters;
188  obj.network_fee_percentage = params.network_percent_of_fee;
189  obj.lifetime_referrer_fee_percentage = params.lifetime_referrer_percent_of_fee;
190  obj.referrer_rewards_percentage = referrer_percent;
191 
192  obj.name = o.name;
193  obj.owner = o.owner;
194  obj.active = o.active;
195  obj.options = o.options;
197  obj.statistics = d.create<account_statistics_object>([&obj](account_statistics_object& s){
198  s.owner = obj.id;
199  s.name = obj.name;
200  s.is_voting = obj.options.is_voting();
201  }).id;
202 
203  if( o.extensions.value.owner_special_authority.valid() )
204  obj.owner_special_authority = *(o.extensions.value.owner_special_authority);
205  if( o.extensions.value.active_special_authority.valid() )
206  obj.active_special_authority = *(o.extensions.value.active_special_authority);
207  if( o.extensions.value.buyback_options.valid() )
208  {
209  obj.allowed_assets = o.extensions.value.buyback_options->markets;
210  obj.allowed_assets->emplace( o.extensions.value.buyback_options->asset_to_buy );
211  }
212 
213  obj.creation_block_num = d._current_block_num;
214  obj.creation_time = d._current_block_time;
215  });
216 
217  const auto& dynamic_properties = d.get_dynamic_global_properties();
218  d.modify(dynamic_properties, [](dynamic_global_property_object& p) {
220  });
221 
222  if( dynamic_properties.accounts_registered_this_interval % global_properties.parameters.accounts_per_fee_scale == 0
223  && global_properties.parameters.account_fee_scale_bitshifts != 0 )
224  {
225  d.modify(global_properties, [](global_property_object& p) {
227  });
228  }
229 
230  if( o.extensions.value.owner_special_authority.valid()
231  || o.extensions.value.active_special_authority.valid() )
232  {
234  {
235  sa.account = new_acnt_object.id;
236  } );
237  }
238 
239  if( o.extensions.value.buyback_options.valid() )
240  {
241  asset_id_type asset_to_buy = o.extensions.value.buyback_options->asset_to_buy;
242 
243  d.create< buyback_object >( [&]( buyback_object& bo )
244  {
245  bo.asset_to_buy = asset_to_buy;
246  } );
247 
248  d.modify( asset_to_buy(d), [&]( asset_object& a )
249  {
250  a.buyback_account = new_acnt_object.id;
251  } );
252  }
253 
254  return new_acnt_object.id;
255 } FC_CAPTURE_AND_RETHROW((o)) }
256 
257 
259 { try {
260  database& d = db();
261 
262  try
263  {
264  if( o.owner ) verify_authority_accounts( d, *o.owner );
265  if( o.active ) verify_authority_accounts( d, *o.active );
266  }
267  GRAPHENE_RECODE_EXC( internal_verify_auth_max_auth_exceeded, account_update_max_auth_exceeded )
268  GRAPHENE_RECODE_EXC( internal_verify_auth_account_not_found, account_update_auth_account_not_found )
269 
270  if( o.extensions.value.owner_special_authority.valid() )
271  evaluate_special_authority( d, *o.extensions.value.owner_special_authority );
272  if( o.extensions.value.active_special_authority.valid() )
273  evaluate_special_authority( d, *o.extensions.value.active_special_authority );
274 
275  acnt = &o.account(d);
276 
277  if( o.new_options.valid() )
279 
280  return void_result();
281 } FC_CAPTURE_AND_RETHROW( (o) ) }
282 
284 { try {
285  database& d = db();
286 
287  bool sa_before = acnt->has_special_authority();
288 
289  // update account statistics
290  if( o.new_options.valid() )
291  {
292  if ( o.new_options->voting_account != acnt->options.voting_account
293  || o.new_options->votes != acnt->options.votes )
294  {
295  d.modify( acnt->statistics( d ), [&d,&o]( account_statistics_object& aso )
296  {
297  aso.is_voting = o.new_options->is_voting();
298  aso.last_vote_time = d.head_block_time();
299  } );
300  }
301  }
302 
303  // update account object
304  d.modify( *acnt, [&o](account_object& a){
305  if( o.owner )
306  {
307  a.owner = *o.owner;
308  a.top_n_control_flags = 0;
309  }
310  if( o.active )
311  {
312  a.active = *o.active;
313  a.top_n_control_flags = 0;
314  }
315  if( o.new_options )
316  {
317  a.options = *o.new_options;
318  a.num_committee_voted = a.options.num_committee_voted();
319  }
320  if( o.extensions.value.owner_special_authority.valid() )
321  {
322  a.owner_special_authority = *(o.extensions.value.owner_special_authority);
323  a.top_n_control_flags = 0;
324  }
325  if( o.extensions.value.active_special_authority.valid() )
326  {
327  a.active_special_authority = *(o.extensions.value.active_special_authority);
328  a.top_n_control_flags = 0;
329  }
330  });
331 
332  bool sa_after = acnt->has_special_authority();
333 
334  if( sa_before && (!sa_after) )
335  {
336  const auto& sa_idx = d.get_index_type< special_authority_index >().indices().get<by_account>();
337  auto sa_it = sa_idx.find( o.account );
338  assert( sa_it != sa_idx.end() );
339  d.remove( *sa_it );
340  }
341  else if( (!sa_before) && sa_after )
342  {
344  {
345  sa.account = o.account;
346  } );
347  }
348 
349  return void_result();
350 } FC_CAPTURE_AND_RETHROW( (o) ) }
351 
353 { try {
354  database& d = db();
355 
358  FC_ASSERT( o.authorizing_account(d).is_lifetime_member(), "The authorizing account must be a lifetime member." );
359 
360  return void_result();
361 } FC_CAPTURE_AND_RETHROW( (o) ) }
362 
364 { try {
365  database& d = db();
366 
367  d.modify(*listed_account, [&o](account_object& a) {
368  if( o.new_listing & o.white_listed )
370  else
372 
373  if( o.new_listing & o.black_listed )
375  else
377  });
378 
380  d.modify( o.authorizing_account(d), [&]( account_object& a ) {
381  if( o.new_listing & o.white_listed )
382  a.whitelisted_accounts.insert( o.account_to_list );
383  else
384  a.whitelisted_accounts.erase( o.account_to_list );
385 
386  if( o.new_listing & o.black_listed )
387  a.blacklisted_accounts.insert( o.account_to_list );
388  else
389  a.blacklisted_accounts.erase( o.account_to_list );
390  });
391 
392  return void_result();
393 } FC_CAPTURE_AND_RETHROW( (o) ) }
394 
396 { try {
397  database& d = db();
398 
401 
402  return {};
403 //} FC_CAPTURE_AND_RETHROW( (o) ) }
404 } FC_RETHROW_EXCEPTIONS( error, "Unable to upgrade account '${a}'", ("a",o.account_to_upgrade(db()).name) ) }
405 
407 { try {
408  database& d = db();
409 
410  d.modify(*account, [&](account_object& a) {
412  {
413  // Upgrade to lifetime member. I don't care what the account was before.
414  a.statistics(d).process_fees(a, d);
415  a.membership_expiration_date = time_point_sec::maximum();
416  a.referrer = a.registrar = a.lifetime_referrer = a.get_id();
417  a.lifetime_referrer_fee_percentage = GRAPHENE_100_PERCENT - a.network_fee_percentage;
418  } else if( a.is_annual_member(d.head_block_time()) ) {
419  // Renew an annual subscription that's still in effect.
420  FC_ASSERT( d.head_block_time() <= HARDFORK_613_TIME );
421  FC_ASSERT(a.membership_expiration_date - d.head_block_time() < fc::days(3650),
422  "May not extend annual membership more than a decade into the future.");
423  a.membership_expiration_date += fc::days(365);
424  } else {
425  // Upgrade from basic account.
426  FC_ASSERT( d.head_block_time() <= HARDFORK_613_TIME );
427  a.statistics(d).process_fees(a, d);
428  assert(a.is_basic_account(d.head_block_time()));
429  a.referrer = a.get_id();
430  a.membership_expiration_date = d.head_block_time() + fc::days(365);
431  }
432  });
433 
434  return {};
435 } FC_RETHROW_EXCEPTIONS( error, "Unable to upgrade account '${a}'", ("a",o.account_to_upgrade(db()).name) ) }
436 
437 } } // graphene::chain
graphene::chain::account_create_evaluator::do_evaluate
void_result do_evaluate(const account_create_operation &o)
Definition: account_evaluator.cpp:121
graphene::chain::buyback_object
Definition: buyback_object.hpp:43
graphene::chain::account_object::is_annual_member
bool is_annual_member(time_point_sec now) const
Definition: account_object.hpp:315
FC_CAPTURE_AND_RETHROW
#define FC_CAPTURE_AND_RETHROW(...)
Definition: exception.hpp:479
graphene::db::object::id
object_id_type id
Definition: object.hpp:69
graphene::chain::dynamic_global_property_object
Maintains global state information (committee_member list, current fees)
Definition: global_property_object.hpp:62
graphene::chain::database
tracks the blockchain state in an extensible manner
Definition: database.hpp:70
graphene::protocol::account_whitelist_operation::authorizing_account
account_id_type authorizing_account
The account which is specifying an opinion of another account.
Definition: account.hpp:210
graphene::chain::account_update_evaluator::do_apply
void_result do_apply(const account_update_operation &o)
Definition: account_evaluator.cpp:283
wlog
#define wlog(FORMAT,...)
Definition: logger.hpp:123
graphene::chain::database::head_block_time
time_point_sec head_block_time() const
Definition: db_getter.cpp:67
graphene::chain::account_whitelist_evaluator::do_evaluate
void_result do_evaluate(const account_whitelist_operation &o)
Definition: account_evaluator.cpp:352
graphene::protocol::account_options::num_committee
uint16_t num_committee
Definition: account.hpp:55
graphene::protocol::vote_id_type::witness
@ witness
Definition: vote.hpp:61
graphene::chain::account_object::blacklisting_accounts
flat_set< account_id_type > blacklisting_accounts
Definition: account_object.hpp:260
graphene::db::object_database::get
const T & get(const object_id_type &id) const
Definition: object_database.hpp:119
graphene::chain::account_object::has_special_authority
bool has_special_authority() const
Definition: account_object.hpp:290
database.hpp
graphene::protocol::account_update_operation::active
optional< authority > active
New active authority. This can be updated by the current active authority.
Definition: account.hpp:158
account_evaluator.hpp
graphene::chain::account_object::active
authority active
Definition: account_object.hpp:220
graphene::chain::global_property_object::parameters
chain_parameters parameters
Definition: global_property_object.hpp:44
FC_THROW
#define FC_THROW( ...)
Definition: exception.hpp:366
graphene::protocol::account_options::voting_account
account_id_type voting_account
Definition: account.hpp:48
graphene::chain::account_create_evaluator::do_apply
object_id_type do_apply(const account_create_operation &o)
Definition: account_evaluator.cpp:155
graphene::chain::account_object::registrar
account_id_type registrar
The account that paid the fee to register this account. Receives a percentage of referral rewards.
Definition: account_object.hpp:194
graphene::chain::account_update_evaluator::do_evaluate
void_result do_evaluate(const account_update_operation &o)
Definition: account_evaluator.cpp:258
graphene::chain::account_upgrade_evaluator::do_evaluate
void_result do_evaluate(const operation_type &o)
Definition: account_evaluator.cpp:395
graphene::protocol::account_create_operation::extensions
extension< ext > extensions
Definition: account.hpp:113
graphene::chain::asset_object
tracks the parameters of an asset
Definition: asset_object.hpp:75
graphene::db::object_database::create
const T & create(F &&constructor)
Definition: object_database.hpp:63
graphene::protocol::account_create_operation::active
authority active
Definition: account.hpp:110
graphene::protocol::account_options
These are the fields which can be updated by the active authority.
Definition: account.hpp:39
graphene::protocol::account_whitelist_operation::black_listed
@ black_listed
This account is blacklisted, but not whitelisted.
Definition: account.hpp:203
graphene::chain::verify_account_votes
void verify_account_votes(const database &db, const account_options &options)
Definition: account_evaluator.cpp:58
graphene::protocol::account_create_operation::registrar
account_id_type registrar
This account pays the fee. Must be a lifetime member.
Definition: account.hpp:100
special_authority_object.hpp
graphene::chain::account_object::network_fee_percentage
uint16_t network_fee_percentage
Percentage of fee which should go to network.
Definition: account_object.hpp:201
worker_object.hpp
graphene::chain::account_upgrade_evaluator::do_apply
void_result do_apply(const operation_type &o)
Definition: account_evaluator.cpp:406
graphene::protocol::authority::account_auths
flat_map< account_id_type, weight_type > account_auths
Definition: authority.hpp:120
graphene::chain::account_object::is_lifetime_member
bool is_lifetime_member() const
Definition: account_object.hpp:304
graphene::protocol::account_update_operation
Update an existing account.
Definition: account.hpp:136
graphene::chain::evaluate_special_authority
void evaluate_special_authority(const database &db, const special_authority &auth)
Definition: special_authority_evaluation.cpp:46
graphene::db::object_database::find
const T * find(const object_id_type &id) const
Definition: object_database.hpp:126
graphene::chain::verify_authority_accounts
void verify_authority_accounts(const database &db, const authority &a)
Definition: account_evaluator.cpp:42
graphene::protocol::account_create_operation::referrer
account_id_type referrer
This account receives a portion of the fee split between registrar and referrer. Must be a member.
Definition: account.hpp:103
graphene::protocol::account_update_operation::owner
optional< authority > owner
New owner authority. If set, this operation requires owner authority to execute.
Definition: account.hpp:156
graphene::protocol::vote_id_type::committee
@ committee
Definition: vote.hpp:60
graphene::protocol::account_whitelist_operation::white_listed
@ white_listed
This account is whitelisted, but not blacklisted.
Definition: account.hpp:202
graphene::protocol::account_whitelist_operation::account_to_list
account_id_type account_to_list
The account being opined about.
Definition: account.hpp:212
graphene::protocol::chain_parameters::allow_non_member_whitelists
bool allow_non_member_whitelists
true if non-member accounts may set whitelists and blacklists; false otherwise
Definition: chain_parameters.hpp:72
graphene::chain::account_statistics_object
Definition: account_object.hpp:46
graphene::chain::account_object::options
account_options options
Definition: account_object.hpp:222
buyback_object.hpp
graphene::db::index::get
const object & get(object_id_type id) const
Definition: index.hpp:110
graphene::db::generic_index::indices
const index_type & indices() const
Definition: generic_index.hpp:115
graphene::protocol::account_create_operation::name
string name
Definition: account.hpp:108
graphene::protocol::chain_parameters::account_fee_scale_bitshifts
uint8_t account_fee_scale_bitshifts
number of times to left bitshift account registration fee at each scaling
Definition: chain_parameters.hpp:79
graphene::chain::account_upgrade_evaluator::account
const account_object * account
Definition: account_evaluator.hpp:58
graphene::protocol::account_create_operation
Definition: account.hpp:81
graphene::chain::dynamic_global_property_object::accounts_registered_this_interval
uint32_t accounts_registered_this_interval
Definition: global_property_object.hpp:76
graphene::chain::account_object
This class represents an account on the object graph.
Definition: account_object.hpp:180
graphene::protocol::account_options::num_committee_voted
uint16_t num_committee_voted() const
Definition: account.hpp:67
graphene::chain::special_authority_object
Definition: special_authority_object.hpp:42
graphene::protocol::fee_schedule::get
const Operation::fee_params_t & get() const
Definition: fee_schedule.hpp:201
graphene::chain::account_object::active_special_authority
special_authority active_special_authority
Definition: account_object.hpp:268
graphene::protocol::account_upgrade_operation::account_to_upgrade
account_id_type account_to_upgrade
The account to upgrade; must not already be a lifetime member.
Definition: account.hpp:244
graphene::protocol::vote_id_type::worker
@ worker
Definition: vote.hpp:62
graphene::protocol::account_update_operation::new_options
optional< account_options > new_options
New account options.
Definition: account.hpp:161
graphene::protocol::account_options::votes
flat_set< vote_id_type > votes
Definition: account.hpp:58
special_authority_evaluation.hpp
graphene::chain::account_whitelist_evaluator::do_apply
void_result do_apply(const account_whitelist_operation &o)
Definition: account_evaluator.cpp:363
graphene::chain::account_object::owner
authority owner
Definition: account_object.hpp:217
graphene::protocol::account_upgrade_operation::upgrade_to_lifetime_member
bool upgrade_to_lifetime_member
If true, the account will be upgraded to a lifetime member; otherwise, it will add a year to the subs...
Definition: account.hpp:246
graphene::chain::account_object::creation_time
time_point_sec creation_time
The time when the account was created.
Definition: account_object.hpp:288
committee_member_object.hpp
graphene::protocol::authority::num_auths
uint32_t num_auths() const
Definition: authority.hpp:111
graphene::protocol::account_options::num_witness
uint16_t num_witness
Definition: account.hpp:52
graphene::chain::account_object::whitelisting_accounts
flat_set< account_id_type > whitelisting_accounts
Definition: account_object.hpp:237
graphene::protocol::account_create_operation::owner
authority owner
Definition: account.hpp:109
graphene::chain::generic_evaluator::db
database & db() const
Definition: evaluator.cpp:39
graphene::chain::account_object::owner_special_authority
special_authority owner_special_authority
Definition: account_object.hpp:267
graphene::protocol::account_create_operation::options
account_options options
Definition: account.hpp:112
FC_ASSERT
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
Definition: exception.hpp:345
graphene::protocol::account_update_operation::extensions
extension< ext > extensions
Definition: account.hpp:162
graphene::chain::account_object::name
string name
The account's name. This name must be unique among all account names on the graph....
Definition: account_object.hpp:209
graphene::db::object_id_type
Definition: object_id.hpp:30
FC_RETHROW_EXCEPTIONS
#define FC_RETHROW_EXCEPTIONS(LOG_LEVEL, FORMAT,...)
Catchs all exception's, std::exceptions, and ... and rethrows them after appending the provided log m...
Definition: exception.hpp:464
graphene::protocol::account_update_operation::account
account_id_type account
The account to update.
Definition: account.hpp:153
graphene::chain::global_property_object
Maintains global state information (committee_member list, current fees)
Definition: global_property_object.hpp:40
graphene::protocol::account_upgrade_operation
Manage an account's membership status.
Definition: account.hpp:235
graphene::protocol::chain_parameters::get_mutable_fees
fee_schedule & get_mutable_fees()
Definition: chain_parameters.hpp:51
graphene::chain::account_object::statistics
account_statistics_id_type statistics
Definition: account_object.hpp:229
GRAPHENE_RECODE_EXC
#define GRAPHENE_RECODE_EXC(cause_type, effect_type)
Definition: exceptions.cpp:175
graphene::db::generic_index
Definition: generic_index.hpp:43
graphene::chain::account_whitelist_evaluator::listed_account
const account_object * listed_account
Definition: account_evaluator.hpp:69
graphene::chain::database::get_global_properties
const global_property_object & get_global_properties() const
Definition: db_getter.cpp:47
graphene::protocol::authority
Identifies a weighted set of keys and accounts that must approve operations.
Definition: authority.hpp:34
graphene::protocol::account_whitelist_operation
This operation is used to whitelist and blacklist accounts, primarily for transacting in whitelisted ...
Definition: account.hpp:197
graphene::chain::account_update_evaluator::acnt
const account_object * acnt
Definition: account_evaluator.hpp:47
graphene::protocol::authority::active
@ active
Definition: authority.hpp:49
graphene::protocol::account_create_operation::referrer_percent
uint16_t referrer_percent
Definition: account.hpp:106
graphene::chain::generic_evaluator::fee_paying_account
const account_object * fee_paying_account
Definition: evaluator.hpp:116
graphene::protocol::account_whitelist_operation::new_listing
uint8_t new_listing
Definition: account.hpp:215
graphene::chain::account_object::referrer
account_id_type referrer
The account credited as referring this account. Receives a percentage of referral rewards.
Definition: account_object.hpp:196
graphene::chain::evaluate_buyback_account_options
void evaluate_buyback_account_options(const database &db, const buyback_account_options &bbo)
Definition: buyback.cpp:32
graphene::chain::account_object::allowed_assets
optional< flat_set< asset_id_type > > allowed_assets
Definition: account_object.hpp:283
internal_exceptions.hpp
GRAPHENE_ASSERT
#define GRAPHENE_ASSERT(expr, exc_type, FORMAT,...)
Definition: exceptions.hpp:28
witness_object.hpp
graphene::protocol::void_result
Definition: base.hpp:86
graphene::db::object_database::remove
void remove(const object &obj)
Definition: object_database.hpp:97
buyback.hpp
graphene::db::object_database::get_index_type
const IndexType & get_index_type() const
Definition: object_database.hpp:77
GRAPHENE_100_PERCENT
#define GRAPHENE_100_PERCENT
Definition: config.hpp:102
graphene
Definition: api.cpp:48
exceptions.hpp
graphene::db::object_database::modify
void modify(const T &obj, const Lambda &m)
Definition: object_database.hpp:99