30 namespace graphene {
namespace protocol {
34 using Op =
typename decltype(t)::type;
35 if (typelist::contains<operation_list_1::list, Op>())
37 if (typelist::contains<operation_list_2::list, Op>())
39 if (typelist::contains<operation_list_3::list, Op>())
41 if (typelist::contains<operation_list_5::list, Op>())
43 if (typelist::contains<operation_list_6::list, Op>())
45 if (typelist::contains<operation_list_9::list, Op>())
47 if (typelist::contains<operation_list_10::list, Op>())
49 if (typelist::contains<operation_list_11::list, Op>())
51 if (typelist::contains<unsupported_operations_list::list, Op>())
63 "LOGIC ERROR: Operation type not handled by custom authorities implementation. " 64 "Please report this error.");
69 return [f=std::move(f)](
const operation& op) {
return f(op).reverse_path(); };
76 if (indicator.is_type<vector<predicate_result>>()) {
77 auto& results = indicator.get<vector<predicate_result>>();
90 static_assert(!is_container<int>,
"");
91 static_assert(is_container<vector<int>>,
"");
92 static_assert(is_container<flat_set<int>>,
"");
93 static_assert(is_container<string>,
"");
94 static_assert(is_flat_set<flat_set<int>>,
"");
95 static_assert(!is_flat_set<vector<int>>,
"");
106 static_assert(
predicate_eq<vector<bool>, int64_t>::valid ==
true,
"");
107 static_assert(
predicate_eq<flat_set<char>, int64_t>::valid ==
true,
"");
114 static_assert(
predicate_eq<flat_set<bool>, flat_set<bool>>::valid ==
true,
"");
115 static_assert(
predicate_eq<flat_set<bool>,
string>::valid ==
false,
"");
121 static_assert(
predicate_ne<vector<bool>, int64_t>::valid ==
true,
"");
122 static_assert(
predicate_ne<flat_set<char>, int64_t>::valid ==
true,
"");
157 static_assert(
predicate_lt<vector<int>, int64_t>::valid ==
false,
"");
163 static_assert(
predicate_in<
int, flat_set<string>>::valid ==
false,
"");
164 static_assert(
predicate_in<
string, flat_set<string>>::valid ==
true,
"");
165 static_assert(
predicate_in<flat_set<string>, flat_set<string>>::valid ==
false,
"");
169 static_assert(
predicate_not_in<
string, flat_set<string>>::valid ==
true,
"");
170 static_assert(
predicate_not_in<flat_set<string>, flat_set<string>>::valid ==
false,
"");
176 static_assert(
predicate_has_all<flat_set<string>, flat_set<string>>::valid ==
true,
"");
182 static_assert(
predicate_has_none<flat_set<string>, flat_set<string>>::valid ==
true,
"");
result_type get_restriction_pred_list_6(size_t idx, vector< restriction > rs)
void for_each(list< Types... >, Callable c)
Invoke the provided callable with an argument wrapper<Type>() for each type in the list...
result_type get_restriction_pred_list_10(size_t idx, vector< restriction > rs)
restriction_predicate_function get_restriction_predicate(vector< restriction > rs, operation::tag_type op_type)
get_restriction_predicate Get a predicate function for the supplied restriction
fc::static_variant< transfer_operation, limit_order_create_operation, limit_order_cancel_operation, call_order_update_operation, fill_order_operation, account_create_operation, account_update_operation, account_whitelist_operation, account_upgrade_operation, account_transfer_operation, asset_create_operation, asset_update_operation, asset_update_bitasset_operation, asset_update_feed_producers_operation, asset_issue_operation, asset_reserve_operation, asset_fund_fee_pool_operation, asset_settle_operation, asset_global_settle_operation, asset_publish_feed_operation, witness_create_operation, witness_update_operation, proposal_create_operation, proposal_update_operation, proposal_delete_operation, withdraw_permission_create_operation, withdraw_permission_update_operation, withdraw_permission_claim_operation, withdraw_permission_delete_operation, committee_member_create_operation, committee_member_update_operation, committee_member_update_global_parameters_operation, vesting_balance_create_operation, vesting_balance_withdraw_operation, worker_create_operation, custom_operation, assert_operation, balance_claim_operation, override_transfer_operation, transfer_to_blind_operation, blind_transfer_operation, transfer_from_blind_operation, asset_settle_cancel_operation, asset_claim_fees_operation, fba_distribute_operation, bid_collateral_operation, execute_bid_operation, asset_claim_pool_operation, asset_update_issuer_operation, htlc_create_operation, htlc_redeem_operation, htlc_redeemed_operation, htlc_extend_operation, htlc_refund_operation, custom_authority_create_operation, custom_authority_update_operation, custom_authority_delete_operation, ticket_create_operation, ticket_update_operation, liquidity_pool_create_operation, liquidity_pool_delete_operation, liquidity_pool_deposit_operation, liquidity_pool_withdraw_operation, liquidity_pool_exchange_operation, samet_fund_create_operation, samet_fund_delete_operation, samet_fund_update_operation, samet_fund_borrow_operation, samet_fund_repay_operation, credit_offer_create_operation, credit_offer_delete_operation, credit_offer_update_operation, credit_offer_accept_operation, credit_deal_repay_operation, credit_deal_expired_operation >
result_type get_restriction_pred_list_2(size_t idx, vector< restriction > rs)
predicate_result & reverse_path()
Reverse the order of the rejection path. Returns a reference to this object.
provides stack-based nullable value similar to boost::optional
vector< rejection_indicator > rejection_path
Failure indicators, ordered from the outermost restriction to the innermost (the location of the reje...
result_type get_restriction_pred_list_5(size_t idx, vector< restriction > rs)
A type describing the result of a restriction predicate.
std::function< predicate_result(const operation &)> restriction_predicate_function
A restriction predicate is a function accepting an operation and returning a predicate_result.
result_type get_restriction_pred_list_11(size_t idx, vector< restriction > rs)
result_type get_restriction_pred_list_3(size_t idx, vector< restriction > rs)
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
result_type get_restriction_pred_list_1(size_t idx, vector< restriction > rs)
result_type get_restriction_pred_list_9(size_t idx, vector< restriction > rs)
typename impl::concat< Lists... >::type concat
Concatenate two or more typelists together.
bool success
Whether or not the operation complied with the restrictions or not.
Return dispatch(list< Types... >, std::size_t index, Callable c)
Index into the typelist for a type T, and invoke the callable with an argument wrapper<T>() ...