diff --git a/libraries/protocol/account.cpp b/libraries/protocol/account.cpp index 9b77d8eca..f290066d3 100644 --- a/libraries/protocol/account.cpp +++ b/libraries/protocol/account.cpp @@ -170,7 +170,7 @@ void account_options::validate() const "May not specify fewer witnesses or committee members than the number voted for."); } -share_type account_create_operation::calculate_fee( const fee_parameters_type& k )const +share_type account_create_operation::calculate_fee( const fee_params_t& k )const { auto core_fee_required = k.basic_fee; @@ -215,7 +215,7 @@ void account_create_operation::validate()const } } -share_type account_update_operation::calculate_fee( const fee_parameters_type& k )const +share_type account_update_operation::calculate_fee( const fee_params_t& k )const { auto core_fee_required = k.fee; if( new_options ) @@ -260,7 +260,7 @@ void account_update_operation::validate()const validate_special_authority( *extensions.value.active_special_authority ); } -share_type account_upgrade_operation::calculate_fee(const fee_parameters_type& k) const +share_type account_upgrade_operation::calculate_fee(const fee_params_t& k) const { if( upgrade_to_lifetime_member ) return k.membership_lifetime_fee; @@ -280,11 +280,11 @@ void account_transfer_operation::validate()const } } // graphene::protocol GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_options ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_whitelist_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_upgrade_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_transfer_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_whitelist_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_upgrade_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_transfer_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_whitelist_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::account_update_operation ) diff --git a/libraries/protocol/assert.cpp b/libraries/protocol/assert.cpp index 2199b314d..7acd7661c 100644 --- a/libraries/protocol/assert.cpp +++ b/libraries/protocol/assert.cpp @@ -61,12 +61,12 @@ void assert_operation::validate()const * The fee for assert operations is proportional to their size, * but cheaper than a data fee because they require no storage */ -share_type assert_operation::calculate_fee(const fee_parameters_type& k)const +share_type assert_operation::calculate_fee(const fee_params_t& k)const { return k.fee * predicates.size(); } } } // namespace graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::assert_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::assert_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::assert_operation ) diff --git a/libraries/protocol/asset_ops.cpp b/libraries/protocol/asset_ops.cpp index 09a7bab33..38dd1bd30 100644 --- a/libraries/protocol/asset_ops.cpp +++ b/libraries/protocol/asset_ops.cpp @@ -74,12 +74,12 @@ bool is_valid_symbol( const string& symbol ) return true; } -share_type asset_issue_operation::calculate_fee(const fee_parameters_type& k)const +share_type asset_issue_operation::calculate_fee(const fee_params_t& k)const { return k.fee + calculate_data_fee( fc::raw::pack_size(memo), k.price_per_kbyte ); } -share_type asset_create_operation::calculate_fee( const asset_create_operation::fee_parameters_type& param, +share_type asset_create_operation::calculate_fee( const asset_create_operation::fee_params_t& param, const optional& sub_asset_creation_fee )const { share_type core_fee_required = param.long_symbol; @@ -157,7 +157,7 @@ void asset_update_issuer_operation::validate()const FC_ASSERT( issuer != new_issuer ); } -share_type asset_update_operation::calculate_fee(const asset_update_operation::fee_parameters_type& k)const +share_type asset_update_operation::calculate_fee(const asset_update_operation::fee_params_t& k)const { return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte ); } @@ -363,20 +363,20 @@ GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::additional_asset_ GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::ext ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::ext ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_fund_fee_pool_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_pool_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_fund_fee_pool_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_pool_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::additional_options_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_issuer_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_bitasset_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_feed_producers_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_issue_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_reserve_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_issuer_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_bitasset_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_feed_producers_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_issue_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_reserve_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation ) diff --git a/libraries/protocol/committee_member.cpp b/libraries/protocol/committee_member.cpp index d48372c94..0f9751b85 100644 --- a/libraries/protocol/committee_member.cpp +++ b/libraries/protocol/committee_member.cpp @@ -49,9 +49,9 @@ void committee_member_update_global_parameters_operation::validate() const } } // graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_global_parameters_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_global_parameters_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_global_parameters_operation ) diff --git a/libraries/protocol/confidential.cpp b/libraries/protocol/confidential.cpp index 43a8b0587..f05c85f45 100644 --- a/libraries/protocol/confidential.cpp +++ b/libraries/protocol/confidential.cpp @@ -61,7 +61,7 @@ void transfer_to_blind_operation::validate()const } } -share_type transfer_to_blind_operation::calculate_fee( const fee_parameters_type& k )const +share_type transfer_to_blind_operation::calculate_fee( const fee_params_t& k )const { return k.fee + outputs.size() * k.price_per_output; } @@ -134,7 +134,7 @@ void blind_transfer_operation::validate()const FC_ASSERT( fc::ecc::verify_sum( in, out, net_public ), "", ("net_public", net_public) ); } FC_CAPTURE_AND_RETHROW( (*this) ) } -share_type blind_transfer_operation::calculate_fee( const fee_parameters_type& k )const +share_type blind_transfer_operation::calculate_fee( const fee_params_t& k )const { return k.fee + outputs.size() * k.price_per_output; } @@ -156,9 +156,9 @@ stealth_confirmation::stealth_confirmation( const std::string& base58 ) } } // graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_to_blind_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_from_blind_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::blind_transfer_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_to_blind_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_from_blind_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::blind_transfer_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_to_blind_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_from_blind_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::blind_transfer_operation ) diff --git a/libraries/protocol/credit_offer.cpp b/libraries/protocol/credit_offer.cpp index 8f6ebf213..27943bff6 100644 --- a/libraries/protocol/credit_offer.cpp +++ b/libraries/protocol/credit_offer.cpp @@ -76,7 +76,7 @@ void credit_offer_create_operation::validate()const validate_acceptable_borrowers( acceptable_borrowers ); } -share_type credit_offer_create_operation::calculate_fee( const fee_parameters_type& schedule )const +share_type credit_offer_create_operation::calculate_fee( const fee_params_t& schedule )const { share_type core_fee_required = schedule.fee; core_fee_required += calculate_data_fee( fc::raw::pack_size(*this), schedule.price_per_kbyte ); @@ -134,7 +134,7 @@ void credit_offer_update_operation::validate()const "Should change something - at least one of the optional data fields should be present" ); } -share_type credit_offer_update_operation::calculate_fee( const fee_parameters_type& schedule )const +share_type credit_offer_update_operation::calculate_fee( const fee_params_t& schedule )const { share_type core_fee_required = schedule.fee; core_fee_required += calculate_data_fee( fc::raw::pack_size(*this), schedule.price_per_kbyte ); @@ -174,12 +174,12 @@ void credit_deal_update_operation::validate()const } } // graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_delete_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_accept_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_repay_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_update_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_delete_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_accept_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_repay_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_update_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_accept_operation::ext ) diff --git a/libraries/protocol/custom.cpp b/libraries/protocol/custom.cpp index 22ea61f72..07165b4be 100644 --- a/libraries/protocol/custom.cpp +++ b/libraries/protocol/custom.cpp @@ -31,12 +31,12 @@ void custom_operation::validate()const { FC_ASSERT( fee.amount > 0 ); } -share_type custom_operation::calculate_fee(const fee_parameters_type& k)const +share_type custom_operation::calculate_fee(const fee_params_t& k)const { return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte ); } } } -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::custom_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::custom_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::custom_operation ) diff --git a/libraries/protocol/custom_authority.cpp b/libraries/protocol/custom_authority.cpp index f7217d01f..45eff2ab5 100644 --- a/libraries/protocol/custom_authority.cpp +++ b/libraries/protocol/custom_authority.cpp @@ -29,7 +29,7 @@ namespace graphene { namespace protocol { -share_type custom_authority_create_operation::calculate_fee(const fee_parameters_type& k)const { +share_type custom_authority_create_operation::calculate_fee(const fee_params_t& k)const { share_type core_fee_required = k.basic_fee; // Note: practically the `*` won't cause an integer overflow, because k.price_per_byte is 32 bit // and the results of pack_size() won't be too big @@ -58,7 +58,7 @@ void custom_authority_create_operation::validate()const { get_restriction_predicate(restrictions, operation_type); } -share_type custom_authority_update_operation::calculate_fee(const fee_parameters_type& k)const { +share_type custom_authority_update_operation::calculate_fee(const fee_params_t& k)const { share_type core_fee_required = k.basic_fee; // Note: practically the `*` won't cause an integer overflow, because k.price_per_byte is 32 bit // and the results of pack_size() won't be too big diff --git a/libraries/protocol/fee_schedule_calc.cpp b/libraries/protocol/fee_schedule_calc.cpp index ccb976da4..e92710f10 100644 --- a/libraries/protocol/fee_schedule_calc.cpp +++ b/libraries/protocol/fee_schedule_calc.cpp @@ -48,7 +48,7 @@ namespace graphene { namespace protocol { auto itr = param.parameters.find(params); if( itr != param.parameters.end() ) params = *itr; - return op.calculate_fee( params.get() ).value; + return op.calculate_fee( params.get() ).value; } } }; @@ -57,7 +57,7 @@ namespace graphene { namespace protocol { uint64_t calc_fee_visitor::operator()(const htlc_create_operation& op)const { //TODO: refactor for performance (see https://github.com/bitshares/bitshares-core/issues/2150) - transfer_operation::fee_parameters_type t; + transfer_operation::fee_params_t t; if (param.exists()) t = param.get(); return op.calculate_fee( param.get(), t.price_per_kbyte).value; @@ -70,7 +70,7 @@ namespace graphene { namespace protocol { optional sub_asset_creation_fee; if( param.exists() && param.exists() ) sub_asset_creation_fee = param.get().fee; - asset_create_operation::fee_parameters_type old_asset_creation_fee_params; + asset_create_operation::fee_params_t old_asset_creation_fee_params; if( param.exists() ) old_asset_creation_fee_params = param.get(); return op.calculate_fee( old_asset_creation_fee_params, sub_asset_creation_fee ).value; diff --git a/libraries/protocol/htlc.cpp b/libraries/protocol/htlc.cpp index 5694ec5a2..13d91f6c7 100644 --- a/libraries/protocol/htlc.cpp +++ b/libraries/protocol/htlc.cpp @@ -34,7 +34,7 @@ namespace graphene { namespace protocol { FC_ASSERT( amount.amount > 0, "HTLC amount should be greater than zero" ); } - share_type htlc_create_operation::calculate_fee( const fee_parameters_type& fee_params, + share_type htlc_create_operation::calculate_fee( const fee_params_t& fee_params, uint32_t fee_per_kb )const { uint64_t days = ( claim_period_seconds + SECONDS_PER_DAY - 1 ) / SECONDS_PER_DAY; @@ -50,7 +50,7 @@ namespace graphene { namespace protocol { FC_ASSERT( fee.amount >= 0, "Fee amount should not be negative" ); } - share_type htlc_redeem_operation::calculate_fee( const fee_parameters_type& fee_params )const + share_type htlc_redeem_operation::calculate_fee( const fee_params_t& fee_params )const { uint64_t kb = ( preimage.size() + 1023 ) / 1024; uint64_t product = kb * fee_params.fee_per_kb; @@ -62,7 +62,7 @@ namespace graphene { namespace protocol { FC_ASSERT( fee.amount >= 0 , "Fee amount should not be negative"); } - share_type htlc_extend_operation::calculate_fee( const fee_parameters_type& fee_params )const + share_type htlc_extend_operation::calculate_fee( const fee_params_t& fee_params )const { uint32_t days = ( seconds_to_add + SECONDS_PER_DAY - 1 ) / SECONDS_PER_DAY; uint64_t per_day_fee = fee_params.fee_per_day * days; @@ -71,10 +71,10 @@ namespace graphene { namespace protocol { } } } -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation::additional_options_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeem_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_extend_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeem_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_extend_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeem_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeemed_operation ) diff --git a/libraries/protocol/include/graphene/protocol/account.hpp b/libraries/protocol/include/graphene/protocol/account.hpp index b7ab4c10c..800201654 100644 --- a/libraries/protocol/include/graphene/protocol/account.hpp +++ b/libraries/protocol/include/graphene/protocol/account.hpp @@ -88,7 +88,7 @@ namespace graphene { namespace protocol { optional< buyback_account_options > buyback_options; }; - struct fee_parameters_type + struct fee_params_t { uint64_t basic_fee = 5*GRAPHENE_BLOCKCHAIN_PRECISION; ///< the cost to register the cheapest non-free account uint64_t premium_fee = 2000*GRAPHENE_BLOCKCHAIN_PRECISION; ///< the cost to register the cheapest non-free account @@ -114,7 +114,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return registrar; } void validate()const; - share_type calculate_fee(const fee_parameters_type& )const; + share_type calculate_fee(const fee_params_t& )const; void get_required_active_authorities( flat_set& a )const { @@ -142,7 +142,7 @@ namespace graphene { namespace protocol { optional< special_authority > active_special_authority; }; - struct fee_parameters_type + struct fee_params_t { share_type fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = GRAPHENE_BLOCKCHAIN_PRECISION; @@ -163,7 +163,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return account; } void validate()const; - share_type calculate_fee( const fee_parameters_type& k )const; + share_type calculate_fee( const fee_params_t& k )const; bool is_owner_update()const { return owner || extensions.value.owner_special_authority.valid(); } @@ -196,7 +196,7 @@ namespace graphene { namespace protocol { */ struct account_whitelist_operation : public base_operation { - struct fee_parameters_type { share_type fee = 300000; }; + struct fee_params_t { share_type fee = 300000; }; enum account_listing { no_listing = 0x0, ///< No opinion is specified about this account white_listed = 0x1, ///< This account is whitelisted, but not blacklisted @@ -234,7 +234,7 @@ namespace graphene { namespace protocol { */ struct account_upgrade_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t membership_annual_fee = 2000 * GRAPHENE_BLOCKCHAIN_PRECISION; uint64_t membership_lifetime_fee = 10000 * GRAPHENE_BLOCKCHAIN_PRECISION; ///< the cost to upgrade to a lifetime member }; @@ -248,7 +248,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return account_to_upgrade; } void validate()const; - share_type calculate_fee( const fee_parameters_type& k )const; + share_type calculate_fee( const fee_params_t& k )const; }; /** @@ -266,7 +266,7 @@ namespace graphene { namespace protocol { */ struct account_transfer_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type account_id; @@ -302,20 +302,20 @@ FC_REFLECT( graphene::protocol::account_upgrade_operation, FC_REFLECT( graphene::protocol::account_whitelist_operation, (fee)(authorizing_account)(account_to_list)(new_listing)(extensions)) -FC_REFLECT( graphene::protocol::account_create_operation::fee_parameters_type, (basic_fee)(premium_fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::account_whitelist_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::account_update_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::account_upgrade_operation::fee_parameters_type, (membership_annual_fee)(membership_lifetime_fee) ) -FC_REFLECT( graphene::protocol::account_transfer_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::account_create_operation::fee_params_t, (basic_fee)(premium_fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::account_whitelist_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::account_update_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::account_upgrade_operation::fee_params_t, (membership_annual_fee)(membership_lifetime_fee) ) +FC_REFLECT( graphene::protocol::account_transfer_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::account_transfer_operation, (fee)(account_id)(new_owner)(extensions) ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_options ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_whitelist_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_upgrade_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_transfer_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_whitelist_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_upgrade_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_transfer_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_whitelist_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::account_update_operation ) diff --git a/libraries/protocol/include/graphene/protocol/assert.hpp b/libraries/protocol/include/graphene/protocol/assert.hpp index fead1a703..5c0e4105b 100644 --- a/libraries/protocol/include/graphene/protocol/assert.hpp +++ b/libraries/protocol/include/graphene/protocol/assert.hpp @@ -92,7 +92,7 @@ namespace graphene { namespace protocol { */ struct assert_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type fee_paying_account; @@ -102,17 +102,17 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return fee_paying_account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; } } // graphene::protocol -FC_REFLECT( graphene::protocol::assert_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::assert_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::account_name_eq_lit_predicate, (account_id)(name) ) FC_REFLECT( graphene::protocol::asset_symbol_eq_lit_predicate, (asset_id)(symbol) ) FC_REFLECT( graphene::protocol::block_id_predicate, (id) ) FC_REFLECT_TYPENAME( graphene::protocol::predicate ) FC_REFLECT( graphene::protocol::assert_operation, (fee)(fee_paying_account)(predicates)(required_auths)(extensions) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::assert_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::assert_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::assert_operation ) diff --git a/libraries/protocol/include/graphene/protocol/asset_ops.hpp b/libraries/protocol/include/graphene/protocol/asset_ops.hpp index 43eec5564..afca25442 100644 --- a/libraries/protocol/include/graphene/protocol/asset_ops.hpp +++ b/libraries/protocol/include/graphene/protocol/asset_ops.hpp @@ -191,7 +191,7 @@ namespace graphene { namespace protocol { */ struct asset_create_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t symbol3 = 500000 * GRAPHENE_BLOCKCHAIN_PRECISION; uint64_t symbol4 = 300000 * GRAPHENE_BLOCKCHAIN_PRECISION; uint64_t long_symbol = 5000 * GRAPHENE_BLOCKCHAIN_PRECISION; @@ -221,7 +221,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return issuer; } void validate()const; - share_type calculate_fee( const fee_parameters_type& k, + share_type calculate_fee( const fee_params_t& k, const optional& sub_asset_creation_fee )const; }; @@ -237,7 +237,7 @@ namespace graphene { namespace protocol { */ struct asset_global_settle_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type issuer; ///< must equal issuer of @ref asset_to_settle @@ -266,7 +266,7 @@ namespace graphene { namespace protocol { */ struct asset_settle_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { /** this fee should be high to encourage small settlement requests to * be performed on the market rather than via forced settlement. * @@ -292,7 +292,7 @@ namespace graphene { namespace protocol { */ struct asset_settle_cancel_operation : public base_operation { - struct fee_parameters_type { }; + struct fee_params_t { }; asset_settle_cancel_operation() = default; asset_settle_cancel_operation( const force_settlement_id_type& fsid, const account_id_type& aid, @@ -312,7 +312,7 @@ namespace graphene { namespace protocol { */ void validate() const { FC_ASSERT( !"Virtual operation"); } - share_type calculate_fee(const fee_parameters_type& params)const + share_type calculate_fee(const fee_params_t& params)const { return 0; } }; @@ -321,7 +321,7 @@ namespace graphene { namespace protocol { */ struct asset_fund_fee_pool_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< core asset account_id_type from_account; @@ -360,7 +360,7 @@ namespace graphene { namespace protocol { fc::optional skip_core_exchange_rate; }; - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; }; @@ -378,7 +378,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return issuer; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -397,7 +397,7 @@ namespace graphene { namespace protocol { */ struct asset_update_bitasset_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type issuer; @@ -429,7 +429,7 @@ namespace graphene { namespace protocol { */ struct asset_update_feed_producers_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 500 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type issuer; @@ -467,7 +467,7 @@ namespace graphene { namespace protocol { fc::optional initial_collateral_ratio; // BSIP-77 }; - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< paid for by publisher account_id_type publisher; @@ -484,7 +484,7 @@ namespace graphene { namespace protocol { */ struct asset_issue_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -501,7 +501,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return issuer; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -512,7 +512,7 @@ namespace graphene { namespace protocol { */ struct asset_reserve_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type payer; @@ -528,7 +528,7 @@ namespace graphene { namespace protocol { */ struct asset_claim_fees_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -564,7 +564,7 @@ namespace graphene { namespace protocol { */ struct asset_update_issuer_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -600,7 +600,7 @@ namespace graphene { namespace protocol { */ struct asset_claim_pool_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -617,11 +617,11 @@ namespace graphene { namespace protocol { } } // graphene::protocol FC_REFLECT( graphene::protocol::asset_claim_fees_operation, (fee)(issuer)(amount_to_claim)(extensions) ) -FC_REFLECT( graphene::protocol::asset_claim_fees_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::asset_claim_fees_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::asset_claim_fees_operation::additional_options_type, (claim_from_asset_id) ) FC_REFLECT( graphene::protocol::asset_claim_pool_operation, (fee)(issuer)(asset_id)(amount_to_claim)(extensions) ) -FC_REFLECT( graphene::protocol::asset_claim_pool_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::asset_claim_pool_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::asset_options, (max_supply) @@ -663,20 +663,20 @@ FC_REFLECT( graphene::protocol::additional_asset_options, FC_REFLECT( graphene::protocol::asset_update_operation::ext, (new_precision)(skip_core_exchange_rate) ) FC_REFLECT( graphene::protocol::asset_publish_feed_operation::ext, (initial_collateral_ratio) ) -FC_REFLECT( graphene::protocol::asset_create_operation::fee_parameters_type, +FC_REFLECT( graphene::protocol::asset_create_operation::fee_params_t, (symbol3)(symbol4)(long_symbol)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::asset_global_settle_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_settle_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_settle_cancel_operation::fee_parameters_type, ) -FC_REFLECT( graphene::protocol::asset_fund_fee_pool_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_update_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::asset_update_issuer_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_update_bitasset_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_update_feed_producers_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_publish_feed_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::asset_issue_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::asset_reserve_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::asset_global_settle_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_settle_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_settle_cancel_operation::fee_params_t, ) +FC_REFLECT( graphene::protocol::asset_fund_fee_pool_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_update_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::asset_update_issuer_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_update_bitasset_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_update_feed_producers_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_publish_feed_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::asset_issue_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::asset_reserve_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::asset_create_operation, @@ -735,21 +735,21 @@ GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::additional_asset_op GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::ext ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::ext ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_fund_fee_pool_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_pool_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_settle_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_fund_fee_pool_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_pool_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_claim_fees_operation::additional_options_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_issuer_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_bitasset_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_issuer_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_update_bitasset_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( - graphene::protocol::asset_update_feed_producers_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_issue_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_reserve_operation::fee_parameters_type ) + graphene::protocol::asset_update_feed_producers_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_publish_feed_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_issue_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_reserve_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::asset_global_settle_operation ) diff --git a/libraries/protocol/include/graphene/protocol/balance.hpp b/libraries/protocol/include/graphene/protocol/balance.hpp index 825bcce95..457ccdd88 100644 --- a/libraries/protocol/include/graphene/protocol/balance.hpp +++ b/libraries/protocol/include/graphene/protocol/balance.hpp @@ -39,7 +39,7 @@ namespace graphene { namespace protocol { */ struct balance_claim_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; asset fee; account_id_type deposit_to_account; @@ -48,7 +48,7 @@ namespace graphene { namespace protocol { asset total_claimed; account_id_type fee_payer()const { return deposit_to_account; } - share_type calculate_fee(const fee_parameters_type& )const { return 0; } + share_type calculate_fee(const fee_params_t& )const { return 0; } void validate()const; void get_required_authorities( vector& a )const { @@ -58,7 +58,7 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::balance_claim_operation::fee_parameters_type, ) +FC_REFLECT( graphene::protocol::balance_claim_operation::fee_params_t, ) FC_REFLECT( graphene::protocol::balance_claim_operation, (fee)(deposit_to_account)(balance_to_claim)(balance_owner_key)(total_claimed) ) diff --git a/libraries/protocol/include/graphene/protocol/committee_member.hpp b/libraries/protocol/include/graphene/protocol/committee_member.hpp index 2bd563800..501dce9d8 100644 --- a/libraries/protocol/include/graphene/protocol/committee_member.hpp +++ b/libraries/protocol/include/graphene/protocol/committee_member.hpp @@ -37,7 +37,7 @@ namespace graphene { namespace protocol { */ struct committee_member_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 5000 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 5000 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; /// The account which owns the committee_member. This account pays the fee for this operation. @@ -57,7 +57,7 @@ namespace graphene { namespace protocol { */ struct committee_member_update_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; /// The committee member to update. @@ -83,7 +83,7 @@ namespace graphene { namespace protocol { */ struct committee_member_update_global_parameters_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; chain_parameters new_parameters; @@ -96,9 +96,9 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::committee_member_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::committee_member_update_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::committee_member_update_global_parameters_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::committee_member_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::committee_member_update_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::committee_member_update_global_parameters_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::committee_member_create_operation, (fee)(committee_member_account)(url) ) @@ -106,9 +106,9 @@ FC_REFLECT( graphene::protocol::committee_member_update_operation, (fee)(committee_member)(committee_member_account)(new_url) ) FC_REFLECT( graphene::protocol::committee_member_update_global_parameters_operation, (fee)(new_parameters) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_global_parameters_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_global_parameters_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::committee_member_update_global_parameters_operation ) diff --git a/libraries/protocol/include/graphene/protocol/confidential.hpp b/libraries/protocol/include/graphene/protocol/confidential.hpp index 5015b9800..8e9b528fa 100644 --- a/libraries/protocol/include/graphene/protocol/confidential.hpp +++ b/libraries/protocol/include/graphene/protocol/confidential.hpp @@ -149,7 +149,7 @@ struct blind_output */ struct transfer_to_blind_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 5*GRAPHENE_BLOCKCHAIN_PRECISION; ///< the cost to register the cheapest non-free account uint32_t price_per_output = 5*GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -163,7 +163,7 @@ struct transfer_to_blind_operation : public base_operation account_id_type fee_payer()const { return from; } void validate()const; - share_type calculate_fee(const fee_parameters_type& )const; + share_type calculate_fee(const fee_params_t& )const; }; /** @@ -172,7 +172,7 @@ struct transfer_to_blind_operation : public base_operation */ struct transfer_from_blind_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 5*GRAPHENE_BLOCKCHAIN_PRECISION; ///< the cost to register the cheapest non-free account }; @@ -237,7 +237,7 @@ struct transfer_from_blind_operation : public base_operation */ struct blind_transfer_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 5*GRAPHENE_BLOCKCHAIN_PRECISION; ///< the cost to register the cheapest non-free account uint32_t price_per_output = 5*GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -249,7 +249,7 @@ struct blind_transfer_operation : public base_operation /** graphene TEMP account */ account_id_type fee_payer()const; void validate()const; - share_type calculate_fee( const fee_parameters_type& k )const; + share_type calculate_fee( const fee_params_t& k )const; void get_required_authorities( vector& a )const { @@ -280,13 +280,13 @@ FC_REFLECT( graphene::protocol::transfer_from_blind_operation, (fee)(amount)(to)(blinding_factor)(inputs) ) FC_REFLECT( graphene::protocol::blind_transfer_operation, (fee)(inputs)(outputs) ) -FC_REFLECT( graphene::protocol::transfer_to_blind_operation::fee_parameters_type, (fee)(price_per_output) ) -FC_REFLECT( graphene::protocol::transfer_from_blind_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::blind_transfer_operation::fee_parameters_type, (fee)(price_per_output) ) +FC_REFLECT( graphene::protocol::transfer_to_blind_operation::fee_params_t, (fee)(price_per_output) ) +FC_REFLECT( graphene::protocol::transfer_from_blind_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::blind_transfer_operation::fee_params_t, (fee)(price_per_output) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_to_blind_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_from_blind_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::blind_transfer_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_to_blind_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_from_blind_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::blind_transfer_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_to_blind_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_from_blind_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::blind_transfer_operation ) diff --git a/libraries/protocol/include/graphene/protocol/credit_offer.hpp b/libraries/protocol/include/graphene/protocol/credit_offer.hpp index 4227ec774..a54178ce7 100644 --- a/libraries/protocol/include/graphene/protocol/credit_offer.hpp +++ b/libraries/protocol/include/graphene/protocol/credit_offer.hpp @@ -35,7 +35,7 @@ namespace graphene { namespace protocol { */ struct credit_offer_create_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -60,7 +60,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return owner_account; } void validate()const override; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -69,7 +69,7 @@ namespace graphene { namespace protocol { */ struct credit_offer_delete_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 0; }; + struct fee_params_t { uint64_t fee = 0; }; asset fee; ///< Operation fee account_id_type owner_account; ///< The account who owns the credit offer @@ -87,7 +87,7 @@ namespace graphene { namespace protocol { */ struct credit_offer_update_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -112,7 +112,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return owner_account; } void validate()const override; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /// Defines automatic repayment types @@ -140,7 +140,7 @@ namespace graphene { namespace protocol { fc::optional auto_repay; }; - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type borrower; ///< The account who accepts the offer @@ -162,7 +162,7 @@ namespace graphene { namespace protocol { */ struct credit_deal_repay_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who repays to the credit offer @@ -183,7 +183,7 @@ namespace graphene { namespace protocol { */ struct credit_deal_expired_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; credit_deal_expired_operation() = default; @@ -205,7 +205,7 @@ namespace graphene { namespace protocol { void validate()const override { FC_ASSERT( !"virtual operation" ); } /// This is a virtual operation; there is no fee - share_type calculate_fee(const fee_parameters_type&)const { return 0; } + share_type calculate_fee(const fee_params_t&)const { return 0; } }; /** @@ -214,7 +214,7 @@ namespace graphene { namespace protocol { */ struct credit_deal_update_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who owns the credit deal @@ -229,13 +229,13 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::credit_offer_create_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::credit_offer_delete_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::credit_offer_update_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::credit_offer_accept_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::credit_deal_repay_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::credit_deal_expired_operation::fee_parameters_type, ) // VIRTUAL -FC_REFLECT( graphene::protocol::credit_deal_update_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::credit_offer_create_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::credit_offer_delete_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::credit_offer_update_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::credit_offer_accept_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::credit_deal_repay_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::credit_deal_expired_operation::fee_params_t, ) // VIRTUAL +FC_REFLECT( graphene::protocol::credit_deal_update_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::credit_offer_create_operation, (fee) @@ -319,13 +319,13 @@ FC_REFLECT( graphene::protocol::credit_deal_update_operation, GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_accept_operation::ext ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_delete_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_accept_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_repay_operation::fee_parameters_type ) -// Note: credit_deal_expired_operation is virtual so no external serialization for its fee_parameters_type -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_update_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_delete_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_accept_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_repay_operation::fee_params_t ) +// Note: credit_deal_expired_operation is virtual so no external serialization for its fee_params_t +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_deal_update_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::credit_offer_delete_operation ) diff --git a/libraries/protocol/include/graphene/protocol/custom.hpp b/libraries/protocol/include/graphene/protocol/custom.hpp index 59ef3757d..49c552069 100644 --- a/libraries/protocol/include/graphene/protocol/custom.hpp +++ b/libraries/protocol/include/graphene/protocol/custom.hpp @@ -37,7 +37,7 @@ namespace graphene { namespace protocol { */ struct custom_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; }; @@ -50,7 +50,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return payer; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; void get_required_active_authorities( flat_set& auths )const { auths.insert( required_auths.begin(), required_auths.end() ); } @@ -58,8 +58,8 @@ namespace graphene { namespace protocol { } } // namespace graphene::protocol -FC_REFLECT( graphene::protocol::custom_operation::fee_parameters_type, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::custom_operation::fee_params_t, (fee)(price_per_kbyte) ) FC_REFLECT( graphene::protocol::custom_operation, (fee)(payer)(required_auths)(id)(data) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::custom_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::custom_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::custom_operation ) diff --git a/libraries/protocol/include/graphene/protocol/custom_authority.hpp b/libraries/protocol/include/graphene/protocol/custom_authority.hpp index 7448c84ae..54aa92928 100644 --- a/libraries/protocol/include/graphene/protocol/custom_authority.hpp +++ b/libraries/protocol/include/graphene/protocol/custom_authority.hpp @@ -34,7 +34,7 @@ namespace graphene { namespace protocol { * @ingroup operations */ struct custom_authority_create_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t basic_fee = GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_byte = GRAPHENE_BLOCKCHAIN_PRECISION / 10; }; @@ -60,7 +60,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -68,7 +68,7 @@ namespace graphene { namespace protocol { * @ingroup operations */ struct custom_authority_update_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t basic_fee = GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_byte = GRAPHENE_BLOCKCHAIN_PRECISION / 10; }; @@ -96,7 +96,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; @@ -105,7 +105,7 @@ namespace graphene { namespace protocol { * @ingroup operations */ struct custom_authority_delete_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; /// Operation fee asset fee; @@ -118,14 +118,14 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const { return k.fee; } + share_type calculate_fee(const fee_params_t& k)const { return k.fee; } }; } } // graphene::protocol -FC_REFLECT(graphene::protocol::custom_authority_create_operation::fee_parameters_type, (basic_fee)(price_per_byte)) -FC_REFLECT(graphene::protocol::custom_authority_update_operation::fee_parameters_type, (basic_fee)(price_per_byte)) -FC_REFLECT(graphene::protocol::custom_authority_delete_operation::fee_parameters_type, (fee)) +FC_REFLECT(graphene::protocol::custom_authority_create_operation::fee_params_t, (basic_fee)(price_per_byte)) +FC_REFLECT(graphene::protocol::custom_authority_update_operation::fee_params_t, (basic_fee)(price_per_byte)) +FC_REFLECT(graphene::protocol::custom_authority_delete_operation::fee_params_t, (fee)) FC_REFLECT(graphene::protocol::custom_authority_create_operation, (fee)(account)(enabled)(valid_from)(valid_to)(operation_type)(auth)(restrictions)(extensions)) diff --git a/libraries/protocol/include/graphene/protocol/fba.hpp b/libraries/protocol/include/graphene/protocol/fba.hpp index 0c58c2eb5..3330c8a65 100644 --- a/libraries/protocol/include/graphene/protocol/fba.hpp +++ b/libraries/protocol/include/graphene/protocol/fba.hpp @@ -29,7 +29,7 @@ namespace graphene { namespace protocol { struct fba_distribute_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; asset fee; // always zero account_id_type account_id; @@ -39,12 +39,12 @@ struct fba_distribute_operation : public base_operation account_id_type fee_payer()const { return account_id; } void validate()const { FC_ASSERT( false ); } - share_type calculate_fee(const fee_parameters_type& k)const { return 0; } + share_type calculate_fee(const fee_params_t& k)const { return 0; } }; } } -FC_REFLECT( graphene::protocol::fba_distribute_operation::fee_parameters_type, ) +FC_REFLECT( graphene::protocol::fba_distribute_operation::fee_params_t, ) FC_REFLECT( graphene::protocol::fba_distribute_operation, (fee)(account_id)(fba_id)(amount) ) diff --git a/libraries/protocol/include/graphene/protocol/fee_schedule.hpp b/libraries/protocol/include/graphene/protocol/fee_schedule.hpp index f3adc6840..45f72b50d 100644 --- a/libraries/protocol/include/graphene/protocol/fee_schedule.hpp +++ b/libraries/protocol/include/graphene/protocol/fee_schedule.hpp @@ -30,48 +30,48 @@ namespace graphene { namespace protocol { template struct transform_to_fee_parameters> { - using type = fc::static_variant< typename T::fee_parameters_type... >; + using type = fc::static_variant< typename T::fee_params_t... >; }; using fee_parameters = transform_to_fee_parameters::type; template class fee_helper { public: - const typename Operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const typename Operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( typename Operation::fee_parameters_type() ); + auto itr = parameters.find( typename Operation::fee_params_t() ); FC_ASSERT( itr != parameters.end() ); - return itr->template get(); + return itr->template get(); } }; template<> class fee_helper { public: - const account_create_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const account_create_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( account_create_operation::fee_parameters_type() ); + auto itr = parameters.find( account_create_operation::fee_params_t() ); FC_ASSERT( itr != parameters.end() ); - return itr->get(); + return itr->get(); } - typename account_create_operation::fee_parameters_type& get(fee_parameters::flat_set_type& parameters)const + typename account_create_operation::fee_params_t& get(fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( account_create_operation::fee_parameters_type() ); + auto itr = parameters.find( account_create_operation::fee_params_t() ); FC_ASSERT( itr != parameters.end() ); - return itr->get(); + return itr->get(); } }; template<> class fee_helper { public: - const bid_collateral_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const bid_collateral_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( bid_collateral_operation::fee_parameters_type() ); + auto itr = parameters.find( bid_collateral_operation::fee_params_t() ); if ( itr != parameters.end() ) - return itr->get(); + return itr->get(); - static bid_collateral_operation::fee_parameters_type bid_collateral_dummy; + static bid_collateral_operation::fee_params_t bid_collateral_dummy; bid_collateral_dummy.fee = fee_helper().cget(parameters).fee; return bid_collateral_dummy; } @@ -80,13 +80,13 @@ namespace graphene { namespace protocol { template<> class fee_helper { public: - const asset_update_issuer_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const asset_update_issuer_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( asset_update_issuer_operation::fee_parameters_type() ); + auto itr = parameters.find( asset_update_issuer_operation::fee_params_t() ); if ( itr != parameters.end() ) - return itr->get(); + return itr->get(); - static asset_update_issuer_operation::fee_parameters_type dummy; + static asset_update_issuer_operation::fee_params_t dummy; dummy.fee = fee_helper().cget(parameters).fee; return dummy; } @@ -95,13 +95,13 @@ namespace graphene { namespace protocol { template<> class fee_helper { public: - const asset_claim_pool_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const asset_claim_pool_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( asset_claim_pool_operation::fee_parameters_type() ); + auto itr = parameters.find( asset_claim_pool_operation::fee_params_t() ); if ( itr != parameters.end() ) - return itr->get(); + return itr->get(); - static asset_claim_pool_operation::fee_parameters_type asset_claim_pool_dummy; + static asset_claim_pool_operation::fee_params_t asset_claim_pool_dummy; asset_claim_pool_dummy.fee = fee_helper().cget(parameters).fee; return asset_claim_pool_dummy; } @@ -110,9 +110,9 @@ namespace graphene { namespace protocol { template<> class fee_helper { public: - const ticket_create_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const ticket_create_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - static ticket_create_operation::fee_parameters_type param; + static ticket_create_operation::fee_params_t param; return param; } }; @@ -120,9 +120,9 @@ namespace graphene { namespace protocol { template<> class fee_helper { public: - const ticket_update_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const ticket_update_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - static ticket_update_operation::fee_parameters_type param; + static ticket_update_operation::fee_params_t param; return param; } }; @@ -130,13 +130,13 @@ namespace graphene { namespace protocol { template<> class fee_helper { public: - const htlc_create_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const htlc_create_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( htlc_create_operation::fee_parameters_type() ); + auto itr = parameters.find( htlc_create_operation::fee_params_t() ); if ( itr != parameters.end() ) - return itr->get(); + return itr->get(); - static htlc_create_operation::fee_parameters_type htlc_create_operation_fee_dummy; + static htlc_create_operation::fee_params_t htlc_create_operation_fee_dummy; return htlc_create_operation_fee_dummy; } }; @@ -144,26 +144,26 @@ namespace graphene { namespace protocol { template<> class fee_helper { public: - const htlc_redeem_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const htlc_redeem_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( htlc_redeem_operation::fee_parameters_type() ); + auto itr = parameters.find( htlc_redeem_operation::fee_params_t() ); if ( itr != parameters.end() ) - return itr->get(); + return itr->get(); - static htlc_redeem_operation::fee_parameters_type htlc_redeem_operation_fee_dummy; + static htlc_redeem_operation::fee_params_t htlc_redeem_operation_fee_dummy; return htlc_redeem_operation_fee_dummy; } }; template<> class fee_helper { public: - const htlc_extend_operation::fee_parameters_type& cget(const fee_parameters::flat_set_type& parameters)const + const htlc_extend_operation::fee_params_t& cget(const fee_parameters::flat_set_type& parameters)const { - auto itr = parameters.find( htlc_extend_operation::fee_parameters_type() ); + auto itr = parameters.find( htlc_extend_operation::fee_params_t() ); if ( itr != parameters.end() ) - return itr->get(); + return itr->get(); - static htlc_extend_operation::fee_parameters_type htlc_extend_operation_fee_dummy; + static htlc_extend_operation::fee_params_t htlc_extend_operation_fee_dummy; return htlc_extend_operation_fee_dummy; } }; @@ -198,19 +198,19 @@ namespace graphene { namespace protocol { void validate()const {} template - const typename Operation::fee_parameters_type& get()const + const typename Operation::fee_params_t& get()const { return fee_helper().cget(parameters); } template - typename Operation::fee_parameters_type& get() + typename Operation::fee_params_t& get() { return fee_helper().get(parameters); } template bool exists()const { - auto itr = parameters.find(typename Operation::fee_parameters_type()); + auto itr = parameters.find(typename Operation::fee_params_t()); return itr != parameters.end(); } diff --git a/libraries/protocol/include/graphene/protocol/htlc.hpp b/libraries/protocol/include/graphene/protocol/htlc.hpp index 606b2f383..99da62d85 100644 --- a/libraries/protocol/include/graphene/protocol/htlc.hpp +++ b/libraries/protocol/include/graphene/protocol/htlc.hpp @@ -44,7 +44,7 @@ namespace graphene { namespace protocol { struct htlc_create_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; uint64_t fee_per_day = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -84,12 +84,12 @@ namespace graphene { namespace protocol { /**** * @brief calculates the fee to be paid for this operation */ - share_type calculate_fee(const fee_parameters_type& fee_params, uint32_t fee_per_kb)const; + share_type calculate_fee(const fee_params_t& fee_params, uint32_t fee_per_kb)const; }; struct htlc_redeem_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; uint64_t fee_per_kb = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -118,7 +118,7 @@ namespace graphene { namespace protocol { /**** * @brief calculates the fee to be paid for this operation */ - share_type calculate_fee(const fee_parameters_type& fee_params)const; + share_type calculate_fee(const fee_params_t& fee_params)const; }; /** @@ -126,7 +126,7 @@ namespace graphene { namespace protocol { */ struct htlc_redeemed_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; htlc_redeemed_operation() {} htlc_redeemed_operation( htlc_id_type htlc_id, account_id_type from, account_id_type to, @@ -138,7 +138,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return to; } void validate()const { FC_ASSERT( !"virtual operation" ); } - share_type calculate_fee(const fee_parameters_type& k)const { return 0; } + share_type calculate_fee(const fee_params_t& k)const { return 0; } htlc_id_type htlc_id; account_id_type from, to, redeemer; @@ -152,7 +152,7 @@ namespace graphene { namespace protocol { struct htlc_extend_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; uint64_t fee_per_day = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -181,12 +181,12 @@ namespace graphene { namespace protocol { /**** * @brief calculates the fee to be paid for this operation */ - share_type calculate_fee(const fee_parameters_type& fee_params)const; + share_type calculate_fee(const fee_params_t& fee_params)const; }; struct htlc_refund_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; htlc_refund_operation(){} htlc_refund_operation( const htlc_id_type& htlc_id, @@ -199,7 +199,7 @@ namespace graphene { namespace protocol { void validate()const { FC_ASSERT( !"virtual operation" ); } /// This is a virtual operation; there is no fee - share_type calculate_fee(const fee_parameters_type& k)const { return 0; } + share_type calculate_fee(const fee_params_t& k)const { return 0; } asset fee; @@ -216,12 +216,12 @@ namespace graphene { namespace protocol { FC_REFLECT_TYPENAME( graphene::protocol::htlc_hash ) -FC_REFLECT( graphene::protocol::htlc_create_operation::fee_parameters_type, (fee) (fee_per_day) ) +FC_REFLECT( graphene::protocol::htlc_create_operation::fee_params_t, (fee) (fee_per_day) ) FC_REFLECT( graphene::protocol::htlc_create_operation::additional_options_type, (memo)) -FC_REFLECT( graphene::protocol::htlc_redeem_operation::fee_parameters_type, (fee) (fee_per_kb) ) -FC_REFLECT( graphene::protocol::htlc_redeemed_operation::fee_parameters_type, ) // VIRTUAL -FC_REFLECT( graphene::protocol::htlc_extend_operation::fee_parameters_type, (fee) (fee_per_day)) -FC_REFLECT( graphene::protocol::htlc_refund_operation::fee_parameters_type, ) // VIRTUAL +FC_REFLECT( graphene::protocol::htlc_redeem_operation::fee_params_t, (fee) (fee_per_kb) ) +FC_REFLECT( graphene::protocol::htlc_redeemed_operation::fee_params_t, ) // VIRTUAL +FC_REFLECT( graphene::protocol::htlc_extend_operation::fee_params_t, (fee) (fee_per_day)) +FC_REFLECT( graphene::protocol::htlc_refund_operation::fee_params_t, ) // VIRTUAL FC_REFLECT( graphene::protocol::htlc_create_operation, (fee)(from)(to)(amount)(preimage_hash)(preimage_size)(claim_period_seconds)(extensions)) @@ -232,10 +232,10 @@ FC_REFLECT( graphene::protocol::htlc_extend_operation, (fee)(htlc_id)(update_iss FC_REFLECT( graphene::protocol::htlc_refund_operation, (fee)(htlc_id)(to)(original_htlc_recipient)(htlc_amount)(htlc_preimage_hash)(htlc_preimage_size)) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation::additional_options_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeem_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_extend_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeem_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_extend_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeem_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::htlc_redeemed_operation ) diff --git a/libraries/protocol/include/graphene/protocol/liquidity_pool.hpp b/libraries/protocol/include/graphene/protocol/liquidity_pool.hpp index 0bbed4a28..ad11c33b5 100644 --- a/libraries/protocol/include/graphene/protocol/liquidity_pool.hpp +++ b/libraries/protocol/include/graphene/protocol/liquidity_pool.hpp @@ -33,7 +33,7 @@ namespace graphene { namespace protocol { */ struct liquidity_pool_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 50 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 50 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who creates the liquidity pool @@ -55,7 +55,7 @@ namespace graphene { namespace protocol { */ struct liquidity_pool_delete_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 0; }; + struct fee_params_t { uint64_t fee = 0; }; asset fee; ///< Operation fee account_id_type account; ///< The account who owns the liquidity pool @@ -73,7 +73,7 @@ namespace graphene { namespace protocol { */ struct liquidity_pool_update_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who owns the liquidity pool @@ -93,7 +93,7 @@ namespace graphene { namespace protocol { */ struct liquidity_pool_deposit_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION / 10; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION / 10; }; asset fee; ///< Operation fee account_id_type account; ///< The account who deposits to the liquidity pool @@ -113,7 +113,7 @@ namespace graphene { namespace protocol { */ struct liquidity_pool_withdraw_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 5 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 5 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who withdraws from the liquidity pool @@ -137,7 +137,7 @@ namespace graphene { namespace protocol { */ struct liquidity_pool_exchange_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who exchanges with the liquidity pool @@ -153,12 +153,12 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::liquidity_pool_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::liquidity_pool_delete_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::liquidity_pool_update_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::liquidity_pool_deposit_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::liquidity_pool_withdraw_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::liquidity_pool_exchange_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::liquidity_pool_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::liquidity_pool_delete_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::liquidity_pool_update_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::liquidity_pool_deposit_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::liquidity_pool_withdraw_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::liquidity_pool_exchange_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::liquidity_pool_create_operation, (fee)(account)(asset_a)(asset_b)(share_asset) @@ -174,12 +174,12 @@ FC_REFLECT( graphene::protocol::liquidity_pool_withdraw_operation, FC_REFLECT( graphene::protocol::liquidity_pool_exchange_operation, (fee)(account)(pool)(amount_to_sell)(min_to_receive)(extensions) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_delete_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_deposit_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_withdraw_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_exchange_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_delete_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_deposit_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_withdraw_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_exchange_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_delete_operation ) diff --git a/libraries/protocol/include/graphene/protocol/market.hpp b/libraries/protocol/include/graphene/protocol/market.hpp index b5dfd413a..02e83cfdc 100644 --- a/libraries/protocol/include/graphene/protocol/market.hpp +++ b/libraries/protocol/include/graphene/protocol/market.hpp @@ -47,7 +47,7 @@ namespace graphene { namespace protocol { */ struct limit_order_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 5 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 5 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type seller; @@ -82,7 +82,7 @@ namespace graphene { namespace protocol { */ struct limit_order_cancel_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 0; }; + struct fee_params_t { uint64_t fee = 0; }; asset fee; limit_order_id_type order; @@ -120,7 +120,7 @@ namespace graphene { namespace protocol { }; /** this is slightly more expensive than limit orders, this pricing impacts prediction markets */ - struct fee_parameters_type { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type funding_account; ///< pays fee, collateral, and cover @@ -143,7 +143,7 @@ namespace graphene { namespace protocol { */ struct fill_order_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; fill_order_operation(){} fill_order_operation( object_id_type o, account_id_type a, asset p, asset r, asset f, price fp, bool m ) @@ -167,7 +167,7 @@ namespace graphene { namespace protocol { void validate()const { FC_ASSERT( !"virtual operation" ); } /// This is a virtual operation; there is no fee - share_type calculate_fee(const fee_parameters_type& k)const { return 0; } + share_type calculate_fee(const fee_params_t& k)const { return 0; } }; /** @@ -179,7 +179,7 @@ namespace graphene { namespace protocol { struct bid_collateral_operation : public base_operation { /** should be equivalent to call_order_update fee */ - struct fee_parameters_type { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type bidder; ///< pays fee and additional collateral @@ -199,7 +199,7 @@ namespace graphene { namespace protocol { */ struct execute_bid_operation : public base_operation { - struct fee_parameters_type {}; + struct fee_params_t {}; execute_bid_operation(){} execute_bid_operation( account_id_type a, asset d, asset c ) @@ -214,16 +214,16 @@ namespace graphene { namespace protocol { void validate()const { FC_ASSERT( !"virtual operation" ); } /// This is a virtual operation; there is no fee - share_type calculate_fee(const fee_parameters_type& k)const { return 0; } + share_type calculate_fee(const fee_params_t& k)const { return 0; } }; } } // graphene::protocol -FC_REFLECT( graphene::protocol::limit_order_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::limit_order_cancel_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::call_order_update_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::bid_collateral_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::fill_order_operation::fee_parameters_type, ) // VIRTUAL -FC_REFLECT( graphene::protocol::execute_bid_operation::fee_parameters_type, ) // VIRTUAL +FC_REFLECT( graphene::protocol::limit_order_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::limit_order_cancel_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::call_order_update_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::bid_collateral_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::fill_order_operation::fee_params_t, ) // VIRTUAL +FC_REFLECT( graphene::protocol::execute_bid_operation::fee_params_t, ) // VIRTUAL FC_REFLECT( graphene::protocol::call_order_update_operation::options_type, (target_collateral_ratio) ) @@ -241,10 +241,10 @@ FC_REFLECT( graphene::protocol::execute_bid_operation, (fee)(bidder)(debt)(collateral) ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation::options_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_cancel_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::bid_collateral_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_cancel_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::bid_collateral_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_cancel_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation ) diff --git a/libraries/protocol/include/graphene/protocol/proposal.hpp b/libraries/protocol/include/graphene/protocol/proposal.hpp index a1a7b27e1..6d3ce173a 100644 --- a/libraries/protocol/include/graphene/protocol/proposal.hpp +++ b/libraries/protocol/include/graphene/protocol/proposal.hpp @@ -69,7 +69,7 @@ namespace graphene { namespace protocol { */ struct proposal_create_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; }; @@ -95,7 +95,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return fee_paying_account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -118,7 +118,7 @@ namespace graphene { namespace protocol { */ struct proposal_update_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; }; @@ -136,7 +136,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return fee_paying_account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; void get_required_authorities( vector& )const; void get_required_active_authorities( flat_set& )const; void get_required_owner_authorities( flat_set& )const; @@ -155,7 +155,7 @@ namespace graphene { namespace protocol { */ struct proposal_delete_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; account_id_type fee_paying_account; bool using_owner_authority = false; @@ -170,9 +170,9 @@ namespace graphene { namespace protocol { }} // graphene::protocol -FC_REFLECT( graphene::protocol::proposal_create_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::proposal_update_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::proposal_delete_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::proposal_create_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::proposal_update_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::proposal_delete_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::proposal_create_operation, (fee)(fee_paying_account)(expiration_time) (proposed_ops)(review_period_seconds)(extensions) ) @@ -181,9 +181,9 @@ FC_REFLECT( graphene::protocol::proposal_update_operation, (fee)(fee_paying_acco (key_approvals_to_add)(key_approvals_to_remove)(extensions) ) FC_REFLECT( graphene::protocol::proposal_delete_operation, (fee)(fee_paying_account)(using_owner_authority)(proposal)(extensions) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_delete_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_delete_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_update_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::proposal_delete_operation ) diff --git a/libraries/protocol/include/graphene/protocol/samet_fund.hpp b/libraries/protocol/include/graphene/protocol/samet_fund.hpp index e7c4bcfe1..95dfac6c3 100644 --- a/libraries/protocol/include/graphene/protocol/samet_fund.hpp +++ b/libraries/protocol/include/graphene/protocol/samet_fund.hpp @@ -35,7 +35,7 @@ namespace graphene { namespace protocol { */ struct samet_fund_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type owner_account; ///< Owner of the fund @@ -55,7 +55,7 @@ namespace graphene { namespace protocol { */ struct samet_fund_delete_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 0; }; + struct fee_params_t { uint64_t fee = 0; }; asset fee; ///< Operation fee account_id_type owner_account; ///< The account who owns the SameT Fund object @@ -73,7 +73,7 @@ namespace graphene { namespace protocol { */ struct samet_fund_update_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type owner_account; ///< Owner of the fund @@ -93,7 +93,7 @@ namespace graphene { namespace protocol { */ struct samet_fund_borrow_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type borrower; ///< The account who borrows from the fund @@ -112,7 +112,7 @@ namespace graphene { namespace protocol { */ struct samet_fund_repay_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 1 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who repays to the SameT Fund @@ -128,11 +128,11 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::samet_fund_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::samet_fund_delete_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::samet_fund_update_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::samet_fund_borrow_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::samet_fund_repay_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::samet_fund_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::samet_fund_delete_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::samet_fund_update_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::samet_fund_borrow_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::samet_fund_repay_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::samet_fund_create_operation, (fee)(owner_account)(asset_type)(balance)(fee_rate)(extensions) ) @@ -145,11 +145,11 @@ FC_REFLECT( graphene::protocol::samet_fund_borrow_operation, FC_REFLECT( graphene::protocol::samet_fund_repay_operation, (fee)(account)(fund_id)(repay_amount)(fund_fee)(extensions) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_delete_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_borrow_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_repay_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_delete_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_borrow_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_repay_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::samet_fund_delete_operation ) diff --git a/libraries/protocol/include/graphene/protocol/ticket.hpp b/libraries/protocol/include/graphene/protocol/ticket.hpp index a4b761feb..774689014 100644 --- a/libraries/protocol/include/graphene/protocol/ticket.hpp +++ b/libraries/protocol/include/graphene/protocol/ticket.hpp @@ -46,7 +46,7 @@ namespace graphene { namespace protocol { */ struct ticket_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 50 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 50 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee account_id_type account; ///< The account who creates the ticket @@ -65,7 +65,7 @@ namespace graphene { namespace protocol { */ struct ticket_update_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 50 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 50 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; ///< Operation fee ticket_id_type ticket; ///< The ticket to update @@ -84,16 +84,16 @@ namespace graphene { namespace protocol { FC_REFLECT_ENUM( graphene::protocol::ticket_type, (liquid)(lock_180_days)(lock_360_days)(lock_720_days)(lock_forever)(TICKET_TYPE_COUNT) ) -FC_REFLECT( graphene::protocol::ticket_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::ticket_update_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::ticket_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::ticket_update_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::ticket_create_operation, (fee)(account)(target_type)(amount)(extensions) ) FC_REFLECT( graphene::protocol::ticket_update_operation, (fee)(ticket)(account)(target_type)(amount_for_new_target)(extensions) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::ticket_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::ticket_update_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::ticket_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::ticket_update_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::ticket_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::ticket_update_operation ) diff --git a/libraries/protocol/include/graphene/protocol/transfer.hpp b/libraries/protocol/include/graphene/protocol/transfer.hpp index 2125ed4eb..7117cd061 100644 --- a/libraries/protocol/include/graphene/protocol/transfer.hpp +++ b/libraries/protocol/include/graphene/protocol/transfer.hpp @@ -44,7 +44,7 @@ namespace graphene { namespace protocol { */ struct transfer_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10 * GRAPHENE_BLOCKCHAIN_PRECISION; /// only required for large memos. }; @@ -63,7 +63,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return from; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -76,7 +76,7 @@ namespace graphene { namespace protocol { */ struct override_transfer_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; /// only required for large memos. }; @@ -96,18 +96,18 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return issuer; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; }} // graphene::protocol -FC_REFLECT( graphene::protocol::transfer_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::override_transfer_operation::fee_parameters_type, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::transfer_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::override_transfer_operation::fee_params_t, (fee)(price_per_kbyte) ) FC_REFLECT( graphene::protocol::override_transfer_operation, (fee)(issuer)(from)(to)(amount)(memo)(extensions) ) FC_REFLECT( graphene::protocol::transfer_operation, (fee)(from)(to)(amount)(memo)(extensions) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::override_transfer_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::override_transfer_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::transfer_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::override_transfer_operation ) diff --git a/libraries/protocol/include/graphene/protocol/vesting.hpp b/libraries/protocol/include/graphene/protocol/vesting.hpp index a733506d1..f632569d2 100644 --- a/libraries/protocol/include/graphene/protocol/vesting.hpp +++ b/libraries/protocol/include/graphene/protocol/vesting.hpp @@ -73,7 +73,7 @@ namespace graphene { namespace protocol { */ struct vesting_balance_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type creator; ///< Who provides funds initially @@ -100,7 +100,7 @@ namespace graphene { namespace protocol { */ struct vesting_balance_withdraw_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 20*GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 20*GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; vesting_balance_id_type vesting_balance; @@ -118,8 +118,8 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::vesting_balance_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::vesting_balance_withdraw_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::vesting_balance_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::vesting_balance_withdraw_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::vesting_balance_create_operation, (fee)(creator)(owner)(amount)(policy) ) FC_REFLECT( graphene::protocol::vesting_balance_withdraw_operation, (fee)(vesting_balance)(owner)(amount) ) @@ -129,7 +129,7 @@ FC_REFLECT(graphene::protocol::cdd_vesting_policy_initializer, (start_claim)(ves FC_REFLECT_EMPTY( graphene::protocol::instant_vesting_policy_initializer ) FC_REFLECT_TYPENAME( graphene::protocol::vesting_policy_initializer ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::vesting_balance_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::vesting_balance_withdraw_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::vesting_balance_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::vesting_balance_withdraw_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::vesting_balance_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::vesting_balance_withdraw_operation ) diff --git a/libraries/protocol/include/graphene/protocol/withdraw_permission.hpp b/libraries/protocol/include/graphene/protocol/withdraw_permission.hpp index a5d01b79e..9398681c2 100644 --- a/libraries/protocol/include/graphene/protocol/withdraw_permission.hpp +++ b/libraries/protocol/include/graphene/protocol/withdraw_permission.hpp @@ -49,7 +49,7 @@ namespace graphene { namespace protocol { */ struct withdraw_permission_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; /// The account authorizing withdrawals from its balances @@ -82,7 +82,7 @@ namespace graphene { namespace protocol { */ struct withdraw_permission_update_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; /// This account pays the fee. Must match permission_to_update->withdraw_from_account @@ -119,7 +119,7 @@ namespace graphene { namespace protocol { */ struct withdraw_permission_claim_operation : public base_operation { - struct fee_parameters_type { + struct fee_params_t { uint64_t fee = 20*GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; }; @@ -139,7 +139,7 @@ namespace graphene { namespace protocol { account_id_type fee_payer()const { return withdraw_to_account; } void validate()const; - share_type calculate_fee(const fee_parameters_type& k)const; + share_type calculate_fee(const fee_params_t& k)const; }; /** @@ -152,7 +152,7 @@ namespace graphene { namespace protocol { */ struct withdraw_permission_delete_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 0; }; + struct fee_params_t { uint64_t fee = 0; }; asset fee; /// Must match withdrawal_permission->withdraw_from_account. This account pays the fee. @@ -168,10 +168,10 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::withdraw_permission_create_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::withdraw_permission_update_operation::fee_parameters_type, (fee) ) -FC_REFLECT( graphene::protocol::withdraw_permission_claim_operation::fee_parameters_type, (fee)(price_per_kbyte) ) -FC_REFLECT( graphene::protocol::withdraw_permission_delete_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::withdraw_permission_create_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::withdraw_permission_update_operation::fee_params_t, (fee) ) +FC_REFLECT( graphene::protocol::withdraw_permission_claim_operation::fee_params_t, (fee)(price_per_kbyte) ) +FC_REFLECT( graphene::protocol::withdraw_permission_delete_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::withdraw_permission_create_operation, (fee)(withdraw_from_account)(authorized_account) @@ -186,10 +186,10 @@ FC_REFLECT( graphene::protocol::withdraw_permission_delete_operation, (fee)(withdraw_from_account)(authorized_account) (withdrawal_permission) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_update_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_claim_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_delete_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_update_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_claim_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_delete_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_update_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_claim_operation ) diff --git a/libraries/protocol/include/graphene/protocol/witness.hpp b/libraries/protocol/include/graphene/protocol/witness.hpp index 89efe54f7..5c176d29f 100644 --- a/libraries/protocol/include/graphene/protocol/witness.hpp +++ b/libraries/protocol/include/graphene/protocol/witness.hpp @@ -36,7 +36,7 @@ namespace graphene { namespace protocol { */ struct witness_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 5000 * GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 5000 * GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; /// The account which owns the witness. This account pays the fee for this operation. @@ -54,7 +54,7 @@ namespace graphene { namespace protocol { */ struct witness_update_operation : public base_operation { - struct fee_parameters_type + struct fee_params_t { share_type fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; }; @@ -77,13 +77,13 @@ namespace graphene { namespace protocol { } } // graphene::protocol -FC_REFLECT( graphene::protocol::witness_create_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::witness_create_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::witness_create_operation, (fee)(witness_account)(url)(block_signing_key) ) -FC_REFLECT( graphene::protocol::witness_update_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::witness_update_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::witness_update_operation, (fee)(witness)(witness_account)(new_url)(new_signing_key) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::witness_create_operation::fee_parameters_type ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::witness_update_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::witness_create_operation::fee_params_t ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::witness_update_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::witness_create_operation ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::witness_update_operation ) diff --git a/libraries/protocol/include/graphene/protocol/worker.hpp b/libraries/protocol/include/graphene/protocol/worker.hpp index 1dfc472d7..ee1244a8f 100644 --- a/libraries/protocol/include/graphene/protocol/worker.hpp +++ b/libraries/protocol/include/graphene/protocol/worker.hpp @@ -78,7 +78,7 @@ namespace graphene { namespace protocol { */ struct worker_create_operation : public base_operation { - struct fee_parameters_type { uint64_t fee = 5000*GRAPHENE_BLOCKCHAIN_PRECISION; }; + struct fee_params_t { uint64_t fee = 5000*GRAPHENE_BLOCKCHAIN_PRECISION; }; asset fee; account_id_type owner; @@ -102,9 +102,9 @@ FC_REFLECT( graphene::protocol::burn_worker_initializer, ) FC_REFLECT( graphene::protocol::refund_worker_initializer, ) FC_REFLECT_TYPENAME( graphene::protocol::worker_initializer ) -FC_REFLECT( graphene::protocol::worker_create_operation::fee_parameters_type, (fee) ) +FC_REFLECT( graphene::protocol::worker_create_operation::fee_params_t, (fee) ) FC_REFLECT( graphene::protocol::worker_create_operation, (fee)(owner)(work_begin_date)(work_end_date)(daily_pay)(name)(url)(initializer) ) -GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::worker_create_operation::fee_parameters_type ) +GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::worker_create_operation::fee_params_t ) GRAPHENE_DECLARE_EXTERNAL_SERIALIZATION( graphene::protocol::worker_create_operation ) diff --git a/libraries/protocol/liquidity_pool.cpp b/libraries/protocol/liquidity_pool.cpp index a2e290227..36574ece5 100644 --- a/libraries/protocol/liquidity_pool.cpp +++ b/libraries/protocol/liquidity_pool.cpp @@ -77,12 +77,12 @@ void liquidity_pool_exchange_operation::validate()const } } // graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_delete_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_deposit_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_withdraw_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_exchange_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_delete_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_deposit_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_withdraw_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_exchange_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::liquidity_pool_delete_operation ) diff --git a/libraries/protocol/market.cpp b/libraries/protocol/market.cpp index 8e8fc721e..a6b4eb54e 100644 --- a/libraries/protocol/market.cpp +++ b/libraries/protocol/market.cpp @@ -59,10 +59,10 @@ void bid_collateral_operation::validate()const } } // graphene::protocol GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation::options_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_cancel_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::bid_collateral_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_cancel_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::bid_collateral_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::limit_order_cancel_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::call_order_update_operation ) diff --git a/libraries/protocol/proposal.cpp b/libraries/protocol/proposal.cpp index 22d66d44f..55432cdd5 100644 --- a/libraries/protocol/proposal.cpp +++ b/libraries/protocol/proposal.cpp @@ -43,7 +43,7 @@ void proposal_create_operation::validate() const for( const auto& op : proposed_ops ) operation_validate( op.op ); } -share_type proposal_create_operation::calculate_fee(const fee_parameters_type& k) const +share_type proposal_create_operation::calculate_fee(const fee_params_t& k) const { return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte ); } @@ -76,7 +76,7 @@ void proposal_delete_operation::validate() const FC_ASSERT( fee.amount >= 0 ); } -share_type proposal_update_operation::calculate_fee(const fee_parameters_type& k) const +share_type proposal_update_operation::calculate_fee(const fee_params_t& k) const { return k.fee + calculate_data_fee( fc::raw::pack_size(*this), k.price_per_kbyte ); } @@ -108,9 +108,9 @@ void proposal_update_operation::get_required_owner_authorities( flat_set= 0 ); } -share_type withdraw_permission_claim_operation::calculate_fee(const fee_parameters_type& k)const +share_type withdraw_permission_claim_operation::calculate_fee(const fee_params_t& k)const { share_type core_fee_required = k.fee; if( memo ) @@ -69,10 +69,10 @@ void withdraw_permission_delete_operation::validate() const } } // graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_update_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_claim_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_delete_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_update_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_claim_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_delete_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_update_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::withdraw_permission_claim_operation ) diff --git a/libraries/protocol/witness.cpp b/libraries/protocol/witness.cpp index 5085156fe..c8e2c9ee9 100644 --- a/libraries/protocol/witness.cpp +++ b/libraries/protocol/witness.cpp @@ -42,7 +42,7 @@ void witness_update_operation::validate() const } } // graphene::protocol -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::witness_create_operation::fee_parameters_type ) -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::witness_update_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::witness_create_operation::fee_params_t ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::witness_update_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::witness_create_operation ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::witness_update_operation ) diff --git a/libraries/protocol/worker.cpp b/libraries/protocol/worker.cpp index 9b6a5d475..195639b7e 100644 --- a/libraries/protocol/worker.cpp +++ b/libraries/protocol/worker.cpp @@ -39,5 +39,5 @@ void worker_create_operation::validate() const } } -GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::worker_create_operation::fee_parameters_type ) +GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::worker_create_operation::fee_params_t ) GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION( graphene::protocol::worker_create_operation ) diff --git a/tests/common/database_fixture.cpp b/tests/common/database_fixture.cpp index b05dc8a0f..5678d04da 100644 --- a/tests/common/database_fixture.cpp +++ b/tests/common/database_fixture.cpp @@ -2225,24 +2225,24 @@ flat_map< uint64_t, graphene::chain::fee_parameters > database_fixture_base::get { flat_map ret_val; - htlc_create_operation::fee_parameters_type create_param; + htlc_create_operation::fee_params_t create_param; create_param.fee_per_day = 2 * GRAPHENE_BLOCKCHAIN_PRECISION; create_param.fee = 2 * GRAPHENE_BLOCKCHAIN_PRECISION; ret_val[((operation)htlc_create_operation()).which()] = create_param; - htlc_redeem_operation::fee_parameters_type redeem_param; + htlc_redeem_operation::fee_params_t redeem_param; redeem_param.fee = 2 * GRAPHENE_BLOCKCHAIN_PRECISION; redeem_param.fee_per_kb = 2 * GRAPHENE_BLOCKCHAIN_PRECISION; ret_val[((operation)htlc_redeem_operation()).which()] = redeem_param; - htlc_extend_operation::fee_parameters_type extend_param; + htlc_extend_operation::fee_params_t extend_param; extend_param.fee = 2 * GRAPHENE_BLOCKCHAIN_PRECISION; extend_param.fee_per_day = 2 * GRAPHENE_BLOCKCHAIN_PRECISION; ret_val[((operation)htlc_extend_operation()).which()] = extend_param; // set the transfer kb fee to something other than default, to verify we're looking // at the correct fee - transfer_operation::fee_parameters_type transfer_param; + transfer_operation::fee_params_t transfer_param; transfer_param.price_per_kbyte *= 2; ret_val[ ((operation)transfer_operation()).which() ] = transfer_param; diff --git a/tests/tests/bsip85_tests.cpp b/tests/tests/bsip85_tests.cpp index fc76ec70f..57bad258c 100644 --- a/tests/tests/bsip85_tests.cpp +++ b/tests/tests/bsip85_tests.cpp @@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE( bsip85_maker_fee_discount_test ) int64_t core_maker_refund = usd_maker_refund == 0 ? 0 : core_create_fee * 1123 / 10000; fee_parameters::flat_set_type new_fees; - limit_order_create_operation::fee_parameters_type create_fee_params; + limit_order_create_operation::fee_params_t create_fee_params; create_fee_params.fee = order_create_fee; new_fees.insert( create_fee_params ); diff --git a/tests/tests/fee_tests.cpp b/tests/tests/fee_tests.cpp index f8d13323c..ce0aa3e7d 100644 --- a/tests/tests/fee_tests.cpp +++ b/tests/tests/fee_tests.cpp @@ -758,8 +758,8 @@ BOOST_AUTO_TEST_CASE( fee_refund_test ) enable_fees(); /* change_fees({ - limit_order_create_operation::fee_parameters_type { order_create_fee }, - limit_order_cancel_operation::fee_parameters_type { order_cancel_fee } + limit_order_create_operation::fee_params_t { order_create_fee }, + limit_order_cancel_operation::fee_params_t { order_cancel_fee } }); */ // C++ -- The above commented out statement doesn't work, I don't know why @@ -767,12 +767,12 @@ BOOST_AUTO_TEST_CASE( fee_refund_test ) { fee_parameters::flat_set_type new_fees; { - limit_order_create_operation::fee_parameters_type create_fee_params; + limit_order_create_operation::fee_params_t create_fee_params; create_fee_params.fee = order_create_fee; new_fees.insert( create_fee_params ); } { - limit_order_cancel_operation::fee_parameters_type cancel_fee_params; + limit_order_cancel_operation::fee_params_t cancel_fee_params; cancel_fee_params.fee = order_cancel_fee; new_fees.insert( cancel_fee_params ); } @@ -884,17 +884,17 @@ BOOST_AUTO_TEST_CASE( non_core_fee_refund_test ) fee_parameters::flat_set_type new_fees; { - limit_order_create_operation::fee_parameters_type create_fee_params; + limit_order_create_operation::fee_params_t create_fee_params; create_fee_params.fee = order_create_fee; new_fees.insert( create_fee_params ); } { - limit_order_cancel_operation::fee_parameters_type cancel_fee_params; + limit_order_cancel_operation::fee_params_t cancel_fee_params; cancel_fee_params.fee = order_cancel_fee; new_fees.insert( cancel_fee_params ); } { - transfer_operation::fee_parameters_type transfer_fee_params; + transfer_operation::fee_params_t transfer_fee_params; transfer_fee_params.fee = 0; transfer_fee_params.price_per_kbyte = 0; new_fees.insert( transfer_fee_params ); @@ -1271,17 +1271,17 @@ BOOST_AUTO_TEST_CASE( hf445_fee_refund_cross_test ) fee_parameters::flat_set_type new_fees; { - limit_order_create_operation::fee_parameters_type create_fee_params; + limit_order_create_operation::fee_params_t create_fee_params; create_fee_params.fee = order_create_fee; new_fees.insert( create_fee_params ); } { - limit_order_cancel_operation::fee_parameters_type cancel_fee_params; + limit_order_cancel_operation::fee_params_t cancel_fee_params; cancel_fee_params.fee = order_cancel_fee; new_fees.insert( cancel_fee_params ); } { - transfer_operation::fee_parameters_type transfer_fee_params; + transfer_operation::fee_params_t transfer_fee_params; transfer_fee_params.fee = 0; transfer_fee_params.price_per_kbyte = 0; new_fees.insert( transfer_fee_params ); @@ -1782,23 +1782,23 @@ BOOST_AUTO_TEST_CASE( bsip26_fee_refund_test ) fee_parameters::flat_set_type new_fees1; fee_parameters::flat_set_type new_fees2; { - limit_order_create_operation::fee_parameters_type create_fee_params; + limit_order_create_operation::fee_params_t create_fee_params; create_fee_params.fee = order_create_fee; new_fees1.insert( create_fee_params ); new_fees2.insert( create_fee_params ); } { - limit_order_cancel_operation::fee_parameters_type cancel_fee_params; + limit_order_cancel_operation::fee_params_t cancel_fee_params; cancel_fee_params.fee = order_cancel_fee1; new_fees1.insert( cancel_fee_params ); } { - limit_order_cancel_operation::fee_parameters_type cancel_fee_params; + limit_order_cancel_operation::fee_params_t cancel_fee_params; cancel_fee_params.fee = order_cancel_fee2; new_fees2.insert( cancel_fee_params ); } { - transfer_operation::fee_parameters_type transfer_fee_params; + transfer_operation::fee_params_t transfer_fee_params; transfer_fee_params.fee = 0; transfer_fee_params.price_per_kbyte = 0; new_fees1.insert( transfer_fee_params ); @@ -2338,17 +2338,17 @@ BOOST_AUTO_TEST_CASE( bsip26_fee_refund_cross_test ) fee_parameters::flat_set_type new_fees; { - limit_order_create_operation::fee_parameters_type create_fee_params; + limit_order_create_operation::fee_params_t create_fee_params; create_fee_params.fee = order_create_fee; new_fees.insert( create_fee_params ); } { - limit_order_cancel_operation::fee_parameters_type cancel_fee_params; + limit_order_cancel_operation::fee_params_t cancel_fee_params; cancel_fee_params.fee = order_cancel_fee; new_fees.insert( cancel_fee_params ); } { - transfer_operation::fee_parameters_type transfer_fee_params; + transfer_operation::fee_params_t transfer_fee_params; transfer_fee_params.fee = 0; transfer_fee_params.price_per_kbyte = 0; new_fees.insert( transfer_fee_params ); @@ -3640,13 +3640,13 @@ BOOST_AUTO_TEST_CASE( stealth_fba_test ) BOOST_AUTO_TEST_CASE( defaults_test ) { try { fee_schedule schedule; - const limit_order_create_operation::fee_parameters_type default_order_fee {}; + const limit_order_create_operation::fee_params_t default_order_fee {}; // no fees set yet -> default asset fee = schedule.calculate_fee( limit_order_create_operation() ); BOOST_CHECK_EQUAL( (int64_t)default_order_fee.fee, fee.amount.value ); - limit_order_create_operation::fee_parameters_type new_order_fee; new_order_fee.fee = 123; + limit_order_create_operation::fee_params_t new_order_fee; new_order_fee.fee = 123; // set fee + check schedule.parameters.insert( new_order_fee ); fee = schedule.calculate_fee( limit_order_create_operation() ); @@ -3654,8 +3654,8 @@ BOOST_AUTO_TEST_CASE( defaults_test ) // bid_collateral fee defaults to call_order_update fee // call_order_update fee is unset -> default - const call_order_update_operation::fee_parameters_type default_short_fee {}; - call_order_update_operation::fee_parameters_type new_short_fee; new_short_fee.fee = 123; + const call_order_update_operation::fee_params_t default_short_fee {}; + call_order_update_operation::fee_params_t new_short_fee; new_short_fee.fee = 123; fee = schedule.calculate_fee( bid_collateral_operation() ); BOOST_CHECK_EQUAL( (int64_t)default_short_fee.fee, fee.amount.value ); @@ -3665,7 +3665,7 @@ BOOST_AUTO_TEST_CASE( defaults_test ) BOOST_CHECK_EQUAL( (int64_t)new_short_fee.fee, fee.amount.value ); // set bid_collateral fee + check - bid_collateral_operation::fee_parameters_type new_bid_fee; new_bid_fee.fee = 124; + bid_collateral_operation::fee_params_t new_bid_fee; new_bid_fee.fee = 124; schedule.parameters.insert( new_bid_fee ); fee = schedule.calculate_fee( bid_collateral_operation() ); BOOST_CHECK_EQUAL( (int64_t)new_bid_fee.fee, fee.amount.value ); @@ -3681,7 +3681,7 @@ BOOST_AUTO_TEST_CASE( sub_asset_creation_fee_test ) { try { fee_schedule schedule; - asset_create_operation::fee_parameters_type default_ac_fee; + asset_create_operation::fee_params_t default_ac_fee; asset_create_operation op; op.symbol = "TEST.SUB"; @@ -3697,7 +3697,7 @@ BOOST_AUTO_TEST_CASE( sub_asset_creation_fee_test ) BOOST_CHECK_EQUAL( fee.amount.value, expected_fee ); // set fee + check - asset_create_operation::fee_parameters_type ac_fee; + asset_create_operation::fee_params_t ac_fee; ac_fee.long_symbol = 100100; ac_fee.symbol4 = 2000200; ac_fee.symbol3 = 30000300; @@ -3713,7 +3713,7 @@ BOOST_AUTO_TEST_CASE( sub_asset_creation_fee_test ) // set fee for account_transfer_operation, no change on asset creation fee BOOST_TEST_MESSAGE("Testing our fee schedule without sub-asset creation fee enabled"); - account_transfer_operation::fee_parameters_type at_fee; + account_transfer_operation::fee_params_t at_fee; at_fee.fee = 5500; schedule.parameters.insert( at_fee ); @@ -3723,7 +3723,7 @@ BOOST_AUTO_TEST_CASE( sub_asset_creation_fee_test ) // enable sub-asset creation fee BOOST_TEST_MESSAGE("Testing our fee schedule with sub-asset creation fee enabled"); - schedule.parameters.insert( ticket_create_operation::fee_parameters_type() ); + schedule.parameters.insert( ticket_create_operation::fee_params_t() ); expected_fee = at_fee.fee + expected_data_fee; diff --git a/tests/tests/htlc_tests.cpp b/tests/tests/htlc_tests.cpp index 833b7feeb..8a844657d 100644 --- a/tests/tests/htlc_tests.cpp +++ b/tests/tests/htlc_tests.cpp @@ -803,7 +803,7 @@ BOOST_AUTO_TEST_CASE( htlc_hardfork_test ) .parameters.extensions.value.updatable_htlc_options->max_preimage_size, 2048u); const graphene::chain::fee_schedule& current_fee_schedule = *(db.get_global_properties().parameters.current_fees); - const htlc_create_operation::fee_parameters_type& htlc_fee + const htlc_create_operation::fee_params_t& htlc_fee = current_fee_schedule.get(); BOOST_CHECK_EQUAL(htlc_fee.fee, 2 * GRAPHENE_BLOCKCHAIN_PRECISION); @@ -904,7 +904,7 @@ BOOST_AUTO_TEST_CASE( fee_calculations ) { // create { - htlc_create_operation::fee_parameters_type create_fee; + htlc_create_operation::fee_params_t create_fee; create_fee.fee = 2; create_fee.fee_per_day = 2; htlc_create_operation create; @@ -920,7 +920,7 @@ BOOST_AUTO_TEST_CASE( fee_calculations ) } // redeem { - htlc_redeem_operation::fee_parameters_type redeem_fee; + htlc_redeem_operation::fee_params_t redeem_fee; redeem_fee.fee_per_kb = 2; redeem_fee.fee = 2; htlc_redeem_operation redeem; @@ -938,7 +938,7 @@ BOOST_AUTO_TEST_CASE( fee_calculations ) } // extend { - htlc_extend_operation::fee_parameters_type extend_fee; + htlc_extend_operation::fee_params_t extend_fee; extend_fee.fee = 2; extend_fee.fee_per_day = 2; htlc_extend_operation extend; diff --git a/tests/tests/operation_tests.cpp b/tests/tests/operation_tests.cpp index 88f3d9e01..54014695c 100644 --- a/tests/tests/operation_tests.cpp +++ b/tests/tests/operation_tests.cpp @@ -2927,7 +2927,7 @@ BOOST_AUTO_TEST_CASE( witness_pay_test ) PUSH_TX( db, trx ); auto pay_fee_time = db.head_block_time().sec_since_epoch(); trx.clear(); - BOOST_CHECK( get_balance(*nathan, *core) == 20000*prec - account_upgrade_operation::fee_parameters_type().membership_lifetime_fee );; + BOOST_CHECK( get_balance(*nathan, *core) == 20000*prec - account_upgrade_operation::fee_params_t().membership_lifetime_fee );; generate_block(); nathan = &get_account("nathan"); diff --git a/tests/tests/pob_tests.cpp b/tests/tests/pob_tests.cpp index 872e6cf34..4de88be10 100644 --- a/tests/tests/pob_tests.cpp +++ b/tests/tests/pob_tests.cpp @@ -121,11 +121,11 @@ BOOST_AUTO_TEST_CASE( validation_and_basic_logic_test ) { auto& fee_params = gpo.parameters.get_mutable_fees().parameters; - auto itr = fee_params.find( ticket_create_operation::fee_parameters_type() ); - itr->get().fee = 1; + auto itr = fee_params.find( ticket_create_operation::fee_params_t() ); + itr->get().fee = 1; - itr = fee_params.find( ticket_update_operation::fee_parameters_type() ); - itr->get().fee = 2; + itr = fee_params.find( ticket_update_operation::fee_params_t() ); + itr->get().fee = 2; }); int64_t expected_balance = init_amount;