30 namespace graphene {
namespace chain {
34 if( a == 0 || p == 0 )
39 fc::uint128_t r = a.
value;
42 return static_cast<uint64_t
>(r);
67 assert( network_cut <= core_fee_total );
70 share_type referral = core_fee_total - network_cut - lifetime_cut;
73 addo.accumulated_fees += network_cut;
80 share_type registrar_cut = referral - referrer_cut;
86 assert( referrer_cut + registrar_cut + network_cut + lifetime_cut == core_fee_total );
102 if( core_fee > cashback_vesting_threshold )
110 set<account_id_type> result;
112 result.insert(auth.first);
114 result.insert(auth.first);
119 set<public_key_type, pubkey_comparator> result;
121 result.insert(auth.first);
123 result.insert(auth.first);
131 result.insert(auth.first);
133 result.insert(auth.first);
141 const account_id_type account_id = a.
get_id();
144 for(
auto item : account_members )
148 for(
auto item : key_members )
152 for(
auto item : address_members )
160 const account_id_type account_id = a.
get_id();
163 for(
auto item : key_members )
167 for(
auto item : address_members )
171 for(
auto item : account_members )
190 const account_id_type account_id = a.
get_id();
194 vector<account_id_type> removed;
197 after_account_members.begin(), after_account_members.end(),
198 std::inserter(removed, removed.end()));
200 for(
auto itr = removed.begin(); itr != removed.end(); ++itr )
203 vector<account_id_type> added;
204 added.reserve(after_account_members.size());
205 std::set_difference(after_account_members.begin(), after_account_members.end(),
207 std::inserter(added, added.end()));
209 for(
auto itr = added.begin(); itr != added.end(); ++itr )
215 set<public_key_type, pubkey_comparator> after_key_members =
get_key_members(a);
217 vector<public_key_type> removed;
220 after_key_members.begin(), after_key_members.end(),
221 std::inserter(removed, removed.end()));
223 for(
auto itr = removed.begin(); itr != removed.end(); ++itr )
226 vector<public_key_type> added;
227 added.reserve(after_key_members.size());
228 std::set_difference(after_key_members.begin(), after_key_members.end(),
230 std::inserter(added, added.end()));
232 for(
auto itr = added.begin(); itr != added.end(); ++itr )
239 vector<address> removed;
242 after_address_members.begin(), after_address_members.end(),
243 std::inserter(removed, removed.end()));
245 for(
auto itr = removed.begin(); itr != removed.end(); ++itr )
248 vector<address> added;
249 added.reserve(after_address_members.size());
250 std::set_difference(after_address_members.begin(), after_address_members.end(),
252 std::inserter(added, added.end()));
254 for(
auto itr = added.begin(); itr != added.end(); ++itr )
260 const uint8_t balances_by_account_index::bits = 20;
261 const uint64_t balances_by_account_index::mask = (1ULL << balances_by_account_index::bits) - 1;
266 while( balances.size() < (abo.owner.instance.value >> bits) + 1 )
268 balances.reserve( (abo.owner.instance.value >> bits) + 1 );
269 balances.resize( balances.size() + 1 );
270 balances.back().resize( 1ULL << bits );
272 balances[abo.owner.instance.value >> bits][abo.owner.instance.value & mask][abo.asset_type] = &abo;
278 if( balances.size() < (abo.owner.instance.value >> bits) + 1 )
return;
279 balances[abo.owner.instance.value >> bits][abo.owner.instance.value & mask].erase( abo.asset_type );
284 ids_being_modified.emplace( before.
id );
289 FC_ASSERT( ids_being_modified.top() == after.
id,
"Modification of ID is not supported!");
290 ids_being_modified.pop();
295 static const map< asset_id_type, const account_balance_object* > _empty;
297 if( balances.size() < (acct.instance.value >> bits) + 1 )
return _empty;
298 return balances[acct.instance.value >> bits][acct.instance.value & mask];
303 if( balances.size() < (acct.instance.value >> bits) + 1 )
return nullptr;
304 const auto& mine = balances[acct.instance.value >> bits][acct.instance.value & mask];
305 const auto itr = mine.find(
asset );
306 if( mine.end() == itr )
return nullptr;
314 (membership_expiration_date)(registrar)(referrer)(lifetime_referrer)
315 (network_fee_percentage)(lifetime_referrer_fee_percentage)(referrer_rewards_percentage)
316 (name)(owner)(active)(options)(num_committee_voted)(statistics)
317 (whitelisting_accounts)(blacklisting_accounts)
318 (whitelisted_accounts)(blacklisted_accounts)
320 (owner_special_authority)(active_special_authority)
321 (top_n_control_flags)
323 (creation_block_num)(creation_time)
328 (owner)(asset_type)(balance)(maintenance_flag) )
334 (total_ops)(removed_ops)
335 (total_core_in_orders)
336 (total_core_inactive)(total_core_pob)(total_core_pol)
337 (total_pob_value)(total_pol_value)
342 (vp_all)(vp_active)(vp_committee)(vp_witness)(vp_worker)
345 (pending_fees)(pending_vested_fees)