BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
chain_parameters.cpp
Go to the documentation of this file.
3 
4 #include <fc/io/raw.hpp>
5 
6 namespace graphene { namespace protocol {
8  current_fees = std::make_shared<fee_schedule>();
9  }
10 
11  // copy constructor
13  {
14  current_fees = std::make_shared<fee_schedule>(*other.current_fees);
15  safe_copy(*this, other);
16  }
17 
18  // copy assignment
20  {
21  if (&other != this)
22  {
23  current_fees = std::make_shared<fee_schedule>(*other.current_fees);
24  safe_copy(*this, other);
25  }
26  return *this;
27  }
28 
29  // copies the easy stuff
30  void chain_parameters::safe_copy(chain_parameters& to, const chain_parameters& from)
31  {
60  to.extensions = from.extensions;
61  }
62 
63  // move constructor
65  {
66  current_fees = std::move(other.current_fees);
67  safe_copy(*this, other);
68  }
69 
70  // move assignment
72  {
73  if (&other != this)
74  {
75  current_fees = std::move(other.current_fees);
76  safe_copy(*this, other);
77  }
78  return *this;
79  }
80 
82  {
88 
93  "Maintenance interval must be longer than block interval" );
95  "Maintenance interval must be a multiple of block interval" );
97  "Transaction size limit is too low" );
99  "Block size limit is too low" );
101  "Maximum transaction expiration time must be greater than a block interval" );
103  "Committee proposal review period must be less than the maximum proposal lifetime" );
104  if( extensions.value.market_fee_network_percent.valid() )
105  {
106  FC_ASSERT( *extensions.value.market_fee_network_percent <= 3000, // GRAPHENE_100_PERCENT is 10000
107  "The market_fee_network_percent parameter can not exceed 30%" );
108  }
109  if( extensions.value.maker_fee_discount_percent.valid() )
110  {
111  FC_ASSERT( *extensions.value.maker_fee_discount_percent <= GRAPHENE_100_PERCENT,
112  "The maker_fee_discount_percent parameter can not exceed 100%" );
113  }
114  }
115 
117  {
118  return extensions.value.market_fee_network_percent.valid() ?
119  *extensions.value.market_fee_network_percent : 0;
120  }
121 
123  {
124  return extensions.value.maker_fee_discount_percent.valid() ?
125  *extensions.value.maker_fee_discount_percent : 0;
126  }
127 
128 }}
129 
uint8_t maximum_asset_feed_publishers
the maximum number of feed publishers for a given asset
uint16_t get_maker_fee_discount_percent() const
If maker_fee_discount_percent is valid, return the value it contains, otherwise return 0...
uint16_t reserve_percent_of_fee
the percentage of the network&#39;s allocation of a fee that is taken out of circulation ...
uint16_t accounts_per_fee_scale
number of accounts between fee scalings
#define GRAPHENE_MIN_TRANSACTION_SIZE_LIMIT
Definition: config.hpp:58
Definition: api.cpp:56
uint32_t witness_pay_vesting_seconds
vesting_seconds parameter for witness VBO&#39;s
uint8_t maintenance_skip_slots
number of block_intervals to skip at maintenance time
uint16_t lifetime_referrer_percent_of_fee
percent of transaction fees paid to network
uint32_t maximum_transaction_size
maximum allowable size in bytes for a transaction
uint32_t committee_proposal_review_period
minimum time in seconds that a proposed transaction requiring committee authority may not be signed...
uint8_t account_fee_scale_bitshifts
number of times to left bitshift account registration fee at each scaling
#define GRAPHENE_MIN_BLOCK_SIZE_LIMIT
Definition: config.hpp:99
uint8_t maximum_asset_whitelist_authorities
maximum number of accounts which an asset may list as authorities for its whitelist OR blacklist ...
uint32_t maximum_proposal_lifetime
maximum lifetime in seconds for proposed transactions to be kept, before expiring ...
const fee_schedule & get_current_fees() const
uint32_t cashback_vesting_period_seconds
time after cashback rewards are accrued before they become liquid
uint16_t get_market_fee_network_percent() const
If market_fee_network_percent is valid, return the value it contains, otherwise return 0...
uint16_t maximum_witness_count
maximum number of active witnesses
#define GRAPHENE_100_PERCENT
Definition: config.hpp:102
#define GRAPHENE_MIN_BLOCK_INTERVAL
Definition: config.hpp:59
share_type fee_liquidation_threshold
value in CORE at which accumulated fees in blockchain-issued market assets should be liquidated ...
std::shared_ptr< const fee_schedule > current_fees
current schedule of fees
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
Definition: exception.hpp:345
bool allow_non_member_whitelists
true if non-member accounts may set whitelists and blacklists; false otherwise
uint16_t network_percent_of_fee
percent of transaction fees paid to network
share_type cashback_vesting_threshold
the maximum cashback that can be received without vesting
#define GRAPHENE_IMPLEMENT_EXTERNAL_SERIALIZATION(type)
Definition: types.hpp:74
uint32_t maximum_time_until_expiration
maximum lifetime in seconds for transactions to be valid, before expiring
uint16_t maximum_committee_count
maximum number of active committee_members
uint32_t maintenance_interval
interval in sections between blockchain maintenance events
share_type witness_pay_per_block
CORE to be allocated to witnesses (per block)
uint16_t max_predicate_opcode
predicate_opcode must be less than this number
bool count_non_member_votes
set to false to restrict voting privlegages to member accounts
#define GRAPHENE_MAX_BLOCK_INTERVAL
Definition: config.hpp:60
uint16_t maximum_authority_membership
largest number of keys/accounts an authority can have
share_type worker_budget_per_day
CORE to be allocated to workers (per day)
chain_parameters & operator=(const chain_parameters &other)
uint32_t maximum_block_size
maximum allowable size in bytes for a block
uint8_t block_interval
interval in seconds between blocks