BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
proposal_evaluator.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2018 Cryptonomex, Inc., and contributors.
3  *
4  * The MIT License
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22  * THE SOFTWARE.
23  */
24 #pragma once
25 
28 
29 namespace graphene { namespace chain {
30 
32  {
33  public:
34  typedef void result_type;
35 
36  uint64_t max_update_instance = 0;
37  uint64_t nested_update_count = 0;
38 
39  template<typename T>
40  void operator()(const T &v) const {}
41 
43 
45 
46  // loop and self visit in proposals
48  };
49 
50  class proposal_create_evaluator : public evaluator<proposal_create_evaluator>
51  {
52  public:
54 
57 
59  flat_set<account_id_type> _required_active_auths;
60  flat_set<account_id_type> _required_owner_auths;
61 
63  };
64 
65  class proposal_update_evaluator : public evaluator<proposal_update_evaluator>
66  {
67  public:
69 
72 
73  const proposal_object* _proposal = nullptr;
75  bool _executed_proposal = false;
76  bool _proposal_failed = false;
77  };
78 
79  class proposal_delete_evaluator : public evaluator<proposal_delete_evaluator>
80  {
81  public:
83 
86 
87  const proposal_object* _proposal = nullptr;
88  };
89 
90 } } // graphene::chain
graphene::chain::proposal_delete_evaluator::do_apply
void_result do_apply(const proposal_delete_operation &)
Definition: proposal_evaluator.cpp:563
graphene::chain::proposal_update_evaluator
Definition: proposal_evaluator.hpp:65
graphene::protocol::proposal_update_operation
The proposal_update_operation updates an existing transaction proposal.
Definition: proposal.hpp:119
graphene::chain::proposal_delete_evaluator::_proposal
const proposal_object * _proposal
Definition: proposal_evaluator.hpp:87
graphene::chain::proposal_update_evaluator::do_evaluate
void_result do_evaluate(const proposal_update_operation &o)
Definition: proposal_evaluator.cpp:479
graphene::chain::proposal_update_evaluator::_processed_transaction
processed_transaction _processed_transaction
Definition: proposal_evaluator.hpp:74
graphene::chain::proposal_create_evaluator::_required_active_auths
flat_set< account_id_type > _required_active_auths
Definition: proposal_evaluator.hpp:59
graphene::chain::hardfork_visitor_1479::result_type
void result_type
Definition: proposal_evaluator.hpp:34
graphene::chain::proposal_create_evaluator::do_evaluate
void_result do_evaluate(const proposal_create_operation &o)
Definition: proposal_evaluator.cpp:377
graphene::protocol::transaction
groups operations that should be applied atomically
Definition: transaction.hpp:69
graphene::chain::proposal_create_evaluator::_required_owner_auths
flat_set< account_id_type > _required_owner_auths
Definition: proposal_evaluator.hpp:60
graphene::chain::proposal_update_evaluator::do_apply
void_result do_apply(const proposal_update_operation &o)
Definition: proposal_evaluator.cpp:503
graphene::chain::proposal_create_evaluator::operation_type
proposal_create_operation operation_type
Definition: proposal_evaluator.hpp:53
graphene::chain::hardfork_visitor_1479
Definition: proposal_evaluator.hpp:31
graphene::chain::hardfork_visitor_1479::operator()
void operator()(const T &v) const
Definition: proposal_evaluator.hpp:40
graphene::chain::proposal_update_evaluator::operation_type
proposal_update_operation operation_type
Definition: proposal_evaluator.hpp:68
operations.hpp
graphene::chain::proposal_delete_evaluator::operation_type
proposal_delete_operation operation_type
Definition: proposal_evaluator.hpp:82
graphene::chain::proposal_update_evaluator::_executed_proposal
bool _executed_proposal
Definition: proposal_evaluator.hpp:75
evaluator.hpp
graphene::chain::proposal_update_evaluator::_proposal_failed
bool _proposal_failed
Definition: proposal_evaluator.hpp:76
graphene::chain::evaluator
Definition: evaluator.hpp:142
graphene::chain::proposal_update_evaluator::_proposal
const proposal_object * _proposal
Definition: proposal_evaluator.hpp:73
graphene::chain::proposal_create_evaluator::do_apply
object_id_type do_apply(const proposal_create_operation &o)
Definition: proposal_evaluator.cpp:444
graphene::protocol::proposal_delete_operation
The proposal_delete_operation deletes an existing transaction proposal.
Definition: proposal.hpp:156
graphene::protocol::processed_transaction
captures the result of evaluating the operations contained in the transaction
Definition: transaction.hpp:292
graphene::chain::proposal_delete_evaluator::do_evaluate
void_result do_evaluate(const proposal_delete_operation &o)
Definition: proposal_evaluator.cpp:548
graphene::db::object_id_type
Definition: object_id.hpp:30
graphene::chain::proposal_delete_evaluator
Definition: proposal_evaluator.hpp:79
graphene::chain::hardfork_visitor_1479::nested_update_count
uint64_t nested_update_count
Definition: proposal_evaluator.hpp:37
graphene::chain::proposal_create_evaluator::_proposed_trx
transaction _proposed_trx
Definition: proposal_evaluator.hpp:58
graphene::chain::hardfork_visitor_1479::max_update_instance
uint64_t max_update_instance
Definition: proposal_evaluator.hpp:36
graphene::protocol::void_result
Definition: base.hpp:86
graphene::protocol::proposal_create_operation
The proposal_create_operation creates a transaction proposal, for use in multi-sig scenarios.
Definition: proposal.hpp:70
graphene::chain::proposal_object
tracks the approval of a partially approved transaction
Definition: proposal_object.hpp:40
graphene::chain::proposal_create_evaluator
Definition: proposal_evaluator.hpp:50
graphene
Definition: api.cpp:48
graphene::chain::proposal_create_evaluator::vtor_1479
hardfork_visitor_1479 vtor_1479
Definition: proposal_evaluator.hpp:62