25 #include <graphene/chain/hardfork.hpp> 28 #include <graphene/chain/hardfork.hpp> 32 namespace graphene {
namespace chain {
39 bool allow_non_immediate_owner = ( db.
head_block_time() >= HARDFORK_CORE_584_TIME );
42 [&db]( account_id_type
id ){ return &id( db ).active; },
43 [&db]( account_id_type
id ){ return &id( db ).owner; },
45 return db.get_viable_custom_authorities(id, op, rejects); },
46 allow_non_immediate_owner,
62 assert( dynamic_cast<const proposal_object*>(&obj) );
64 const proposal_id_type proposal_id = p.
get_id();
67 _account_to_proposals[a].insert( proposal_id );
69 _account_to_proposals[a].insert( proposal_id );
71 _account_to_proposals[a].insert( proposal_id );
73 _account_to_proposals[a].insert( proposal_id );
76 void required_approval_index::remove( account_id_type a, proposal_id_type p )
78 auto itr = _account_to_proposals.find(a);
79 if( itr != _account_to_proposals.end() )
81 itr->second.erase( p );
82 if( itr->second.empty() )
83 _account_to_proposals.erase( itr->first );
89 assert( dynamic_cast<const proposal_object*>(&obj) );
91 const proposal_id_type proposal_id = p.
get_id();
94 remove( a, proposal_id );
96 remove( a, proposal_id );
98 remove( a, proposal_id );
100 remove( a, proposal_id );
103 void required_approval_index::insert_or_remove_delta( proposal_id_type p,
104 const flat_set<account_id_type>& before,
105 const flat_set<account_id_type>& after )
107 auto b = before.begin();
108 auto a = after.begin();
109 while( b != before.end() || a != after.end() )
111 if( a == after.end() || (b != before.end() && *b < *a) )
116 else if( b == before.end() || (a != after.end() && *a < *b) )
118 _account_to_proposals[*a].insert( p );
139 const proposal_id_type proposal_id = p.
get_id();
time_point_sec expiration_time
chain_parameters parameters
map< custom_authority_id_type, rejected_predicate > rejected_predicate_map
vector< operation > operations
virtual void object_removed(const object &obj) override
time_point_sec head_block_time() const
flat_set< account_id_type > available_active_approvals
tracks the blockchain state in an extensible manner
void verify_authority(const vector< operation > &ops, const flat_set< public_key_type > &sigs, const std::function< const authority *(account_id_type)> &get_active, const std::function< const authority *(account_id_type)> &get_owner, const custom_authority_lookup &get_custom, bool allow_non_immediate_owner, bool ignore_custom_operation_required_auths, uint32_t max_recursion=GRAPHENE_MAX_SIG_CHECK_DEPTH, bool allow_committee=false, const flat_set< account_id_type > &active_approvals=flat_set< account_id_type >(), const flat_set< account_id_type > &owner_approvals=flat_set< account_id_type >())
#define FC_REFLECT_DERIVED_NO_TYPENAME(TYPE, INHERITS, MEMBERS)
Used to generate a useful error report when an exception is thrown.At each level in the stack where t...
fc::static_variant< transfer_operation, limit_order_create_operation, limit_order_cancel_operation, call_order_update_operation, fill_order_operation, account_create_operation, account_update_operation, account_whitelist_operation, account_upgrade_operation, account_transfer_operation, asset_create_operation, asset_update_operation, asset_update_bitasset_operation, asset_update_feed_producers_operation, asset_issue_operation, asset_reserve_operation, asset_fund_fee_pool_operation, asset_settle_operation, asset_global_settle_operation, asset_publish_feed_operation, witness_create_operation, witness_update_operation, proposal_create_operation, proposal_update_operation, proposal_delete_operation, withdraw_permission_create_operation, withdraw_permission_update_operation, withdraw_permission_claim_operation, withdraw_permission_delete_operation, committee_member_create_operation, committee_member_update_operation, committee_member_update_global_parameters_operation, vesting_balance_create_operation, vesting_balance_withdraw_operation, worker_create_operation, custom_operation, assert_operation, balance_claim_operation, override_transfer_operation, transfer_to_blind_operation, blind_transfer_operation, transfer_from_blind_operation, asset_settle_cancel_operation, asset_claim_fees_operation, fba_distribute_operation, bid_collateral_operation, execute_bid_operation, asset_claim_pool_operation, asset_update_issuer_operation, htlc_create_operation, htlc_redeem_operation, htlc_redeemed_operation, htlc_extend_operation, htlc_refund_operation, custom_authority_create_operation, custom_authority_update_operation, custom_authority_delete_operation, ticket_create_operation, ticket_update_operation, liquidity_pool_create_operation, liquidity_pool_delete_operation, liquidity_pool_deposit_operation, liquidity_pool_withdraw_operation, liquidity_pool_exchange_operation, samet_fund_create_operation, samet_fund_delete_operation, samet_fund_update_operation, samet_fund_borrow_operation, samet_fund_repay_operation, credit_offer_create_operation, credit_offer_delete_operation, credit_offer_update_operation, credit_offer_accept_operation, credit_deal_repay_operation, credit_deal_expired_operation >
flat_set< account_id_type > required_owner_approvals
flat_set< account_id_type > available_owner_approvals
object_id< SpaceID, TypeID > get_id() const
virtual void object_modified(const object &after) override
virtual void about_to_modify(const object &before) override
#define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION(type)
optional< time_point_sec > review_period_time
transaction proposed_transaction
flat_set< account_id_type > required_active_approvals
bool is_authorized_to_execute(database &db) const
uint8_t max_authority_depth
flat_set< public_key_type > available_key_approvals
base for all database objects
virtual void object_inserted(const object &obj) override
const global_property_object & get_global_properties() const
tracks the approval of a partially approved transaction