Example #1
0
 void get_required_active_authorities( flat_set<account_id_type>& a )const
 {
    // registrar should be required anyway as it is the fee_payer(), but we insert it here just to be sure
    a.insert( registrar );
    if( extensions.value.buyback_options.valid() )
       a.insert( extensions.value.buyback_options->asset_to_buy_issuer );
 }
Example #2
0
 void get_impacted_accounts( flat_set<account_id_type>& i)const
 { i.insert( withdraw_from_account ); }
Example #3
0
 void get_impacted_accounts( flat_set<account_id_type>& i )const
 { i.insert(owner); }
Example #4
0
 void get_required_posting_authorities(flat_set<account_name_type> &a) const {
     a.insert(author);
 }
Example #5
0
 void get_required_posting_authorities( flat_set<string>& a )const{ for( const auto& i : required_posting_auths ) a.insert(i); }
Example #6
0
void proposal_update_operation::get_required_active_authorities( flat_set<account_id_type>& a )const
{
   for( const auto& i : active_approvals_to_add )    a.insert(i);
   for( const auto& i : active_approvals_to_remove ) a.insert(i);
}
Example #7
0
 void get_required_posting_authorities( flat_set< account_name_type >& a )const
 {
    a.insert( required_posting.begin(), required_posting.end() );
 }
Example #8
0
 static void add_authority_accounts( flat_set<account_id_type>& i, const authority& a )
 {
    for( auto& item : a.account_auths )
       i.insert( item.first );
 }
Example #9
0
 void get_required_owner_authorities(flat_set<account_name_type> &a) const {
     if (require_owner) {
         a.insert(challenged);
     }
 }
Example #10
0
 void get_required_posting_authorities( flat_set<string>& a )const{ a.insert(voter); }
Example #11
0
static void get_relevant_accounts( const object* obj, flat_set<account_id_type>& accounts )
{
   if( obj->id.space() == protocol_ids )
   {
      switch( (object_type)obj->id.type() )
      {
        case null_object_type:
        case base_object_type:
        case OBJECT_TYPE_COUNT:
           return;
        case account_object_type:{
           accounts.insert( obj->id );
           break;
        } case asset_object_type:{
           const auto& aobj = dynamic_cast<const asset_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->issuer );
           break;
        } case force_settlement_object_type:{
           const auto& aobj = dynamic_cast<const force_settlement_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->owner );
           break;
        } case committee_member_object_type:{
           const auto& aobj = dynamic_cast<const committee_member_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->committee_member_account );
           break;
        } case witness_object_type:{
           const auto& aobj = dynamic_cast<const witness_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->witness_account );
           break;
        } case limit_order_object_type:{
           const auto& aobj = dynamic_cast<const limit_order_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->seller );
           break;
        } case call_order_object_type:{
           const auto& aobj = dynamic_cast<const call_order_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->borrower );
           break;
        } case custom_object_type:{
          break;
        } case proposal_object_type:{
           const auto& aobj = dynamic_cast<const proposal_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           transaction_get_impacted_accounts( aobj->proposed_transaction, accounts );
           break;
        } case operation_history_object_type:{
           const auto& aobj = dynamic_cast<const operation_history_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           operation_get_impacted_accounts( aobj->op, accounts );
           break;
        } case withdraw_permission_object_type:{
           const auto& aobj = dynamic_cast<const withdraw_permission_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->withdraw_from_account );
           accounts.insert( aobj->authorized_account );
           break;
        } case vesting_balance_object_type:{
           const auto& aobj = dynamic_cast<const vesting_balance_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->owner );
           break;
        } case worker_object_type:{
           const auto& aobj = dynamic_cast<const worker_object*>(obj);
           FC_ASSERT( aobj != nullptr );
           accounts.insert( aobj->worker_account );
           break;
        } case balance_object_type:{
           /** these are free from any accounts */
           break;
        }
      }
   }
   else if( obj->id.space() == implementation_ids )
   {
      switch( (impl_object_type)obj->id.type() )
      {
             case impl_global_property_object_type:
              break;
             case impl_dynamic_global_property_object_type:
              break;
             case impl_reserved0_object_type:
              break;
             case impl_asset_dynamic_data_type:
              break;
             case impl_asset_bitasset_data_type:
              break;
             case impl_account_balance_object_type:{
              const auto& aobj = dynamic_cast<const account_balance_object*>(obj);
              FC_ASSERT( aobj != nullptr );
              accounts.insert( aobj->owner );
              break;
           } case impl_account_statistics_object_type:{
              const auto& aobj = dynamic_cast<const account_statistics_object*>(obj);
              FC_ASSERT( aobj != nullptr );
              accounts.insert( aobj->owner );
              break;
           } case impl_transaction_object_type:{
              const auto& aobj = dynamic_cast<const transaction_object*>(obj);
              FC_ASSERT( aobj != nullptr );
              transaction_get_impacted_accounts( aobj->trx, accounts );
              break;
           } case impl_blinded_balance_object_type:{
              const auto& aobj = dynamic_cast<const blinded_balance_object*>(obj);
              FC_ASSERT( aobj != nullptr );
              for( const auto& a : aobj->owner.account_auths )
                accounts.insert( a.first );
              break;
           } case impl_block_summary_object_type:
              break;
             case impl_account_transaction_history_object_type: {
              const auto& aobj = dynamic_cast<const account_transaction_history_object*>(obj);
              FC_ASSERT( aobj != nullptr );
              accounts.insert( aobj->account );
              break;
           } case impl_chain_property_object_type:
              break;
             case impl_witness_schedule_object_type:
              break;
             case impl_budget_record_object_type:
              break;
             case impl_special_authority_object_type:
              break;
             case impl_buyback_object_type:
              break;
             case impl_fba_accumulator_object_type:
              break;
             case impl_collateral_bid_object_type:{
              const auto& aobj = dynamic_cast<const collateral_bid_object*>(obj);
              FC_ASSERT( aobj != nullptr );
              accounts.insert( aobj->bidder );
              break;
           }
      }
   }
} // end get_relevant_accounts( const object* obj, flat_set<account_id_type>& accounts )
Example #12
0
 void  get_required_active_authorities( flat_set<string>& a )const{ a.insert(owner); }
Example #13
0
 void get_required_active_authorities( flat_set<string>& a )const
 { if( !owner /*&& active*/) a.insert( account ); }
Example #14
0
 void get_required_owner_authorities( flat_set<string>& a )const
 { if( owner ) a.insert( account ); }
Example #15
0
 void get_impacted_accounts( flat_set<account_id_type>& i)const
 { i.insert( authorized_account ); }
Example #16
0
 void get_required_owner_authorities(flat_set<account_name_type> &a) const {
     if (amount.symbol == VESTS_SYMBOL) {
         a.insert(from);
     }
 }
Example #17
0
 void get_required_active_authorities( flat_set< account_name_type >& a )const
 {
    a.insert( required_active.begin(), required_active.end() );
 }
Example #18
0
 void get_required_posting_authorities(flat_set<account_name_type> &a) const {
     for (const auto &i : required_posting_auths) {
         a.insert(i);
     }
 }
 void get_required_active_authorities( flat_set<account_name_type>& a )const{ a.insert(account); }
Example #20
0
 void get_required_posting_authorities(flat_set<account_name_type> &a) const {
     if (!current_reset_account.size()) {
         a.insert(account);
     }
 }
Example #21
0
 void get_required_active_authorities( flat_set<account_id_type>& a )const
 { if( !is_owner_update() ) a.insert( account ); }
Example #22
0
 void get_required_owner_authorities(flat_set<account_name_type> &a) const {
     a.insert(account_to_recover);
 }
Example #23
0
 void get_required_owner_authorities( flat_set<account_id_type>& a )const
 { if( owner ) a.insert( account ); }
Example #24
0
 void get_required_owner_authorities( flat_set<string>& a )const { if(amount.symbol == VESTS_SYMBOL) a.insert(from); }