Fix a couple misleading names
This commit is contained in:
parent
2241fda3af
commit
38956692ee
8 changed files with 32 additions and 32 deletions
|
|
@ -86,7 +86,7 @@
|
||||||
#define GRAPHENE_DEFAULT_MAX_WITNESSES (1001) // SHOULD BE ODD
|
#define GRAPHENE_DEFAULT_MAX_WITNESSES (1001) // SHOULD BE ODD
|
||||||
#define GRAPHENE_DEFAULT_MAX_COMMITTEE (1001) // SHOULD BE ODD
|
#define GRAPHENE_DEFAULT_MAX_COMMITTEE (1001) // SHOULD BE ODD
|
||||||
#define GRAPHENE_DEFAULT_MAX_PROPOSAL_LIFETIME_SEC (60*60*24*7*4) // Four weeks
|
#define GRAPHENE_DEFAULT_MAX_PROPOSAL_LIFETIME_SEC (60*60*24*7*4) // Four weeks
|
||||||
#define GRAPHENE_DEFAULT_GENESIS_PROPOSAL_REVIEW_PERIOD_SEC (60*60*24*7*2) // Two weeks
|
#define GRAPHENE_DEFAULT_COMMITTEE_PROPOSAL_REVIEW_PERIOD_SEC (60*60*24*7*2) // Two weeks
|
||||||
#define GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE (20*GRAPHENE_1_PERCENT)
|
#define GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE (20*GRAPHENE_1_PERCENT)
|
||||||
#define GRAPHENE_DEFAULT_LIFETIME_REFERRER_PERCENT_OF_FEE (30*GRAPHENE_1_PERCENT)
|
#define GRAPHENE_DEFAULT_LIFETIME_REFERRER_PERCENT_OF_FEE (30*GRAPHENE_1_PERCENT)
|
||||||
#define GRAPHENE_DEFAULT_MAX_BULK_DISCOUNT_PERCENT (50*GRAPHENE_1_PERCENT)
|
#define GRAPHENE_DEFAULT_MAX_BULK_DISCOUNT_PERCENT (50*GRAPHENE_1_PERCENT)
|
||||||
|
|
@ -139,7 +139,7 @@
|
||||||
* Reserved Account IDs with special meaning
|
* Reserved Account IDs with special meaning
|
||||||
*/
|
*/
|
||||||
///@{
|
///@{
|
||||||
/// Represents the current committee members, two-week review period (GRAPHENE_DEFAULT_GENESIS_PROPOSAL_REVIEW_PERIOD_SEC)
|
/// Represents the current committee members, two-week review period
|
||||||
#define GRAPHENE_COMMITTEE_ACCOUNT (graphene::chain::account_id_type(0))
|
#define GRAPHENE_COMMITTEE_ACCOUNT (graphene::chain::account_id_type(0))
|
||||||
/// Represents the current witnesses
|
/// Represents the current witnesses
|
||||||
#define GRAPHENE_WITNESS_ACCOUNT (graphene::chain::account_id_type(1))
|
#define GRAPHENE_WITNESS_ACCOUNT (graphene::chain::account_id_type(1))
|
||||||
|
|
|
||||||
|
|
@ -85,16 +85,16 @@ struct genesis_state_type {
|
||||||
share_type daily_pay;
|
share_type daily_pay;
|
||||||
};
|
};
|
||||||
|
|
||||||
chain_parameters initial_parameters;
|
time_point_sec initial_timestamp;
|
||||||
vector<initial_account_type> initial_accounts;
|
chain_parameters initial_parameters;
|
||||||
vector<initial_asset_type> initial_assets;
|
vector<initial_account_type> initial_accounts;
|
||||||
vector<initial_balance_type> initial_balances;
|
vector<initial_asset_type> initial_assets;
|
||||||
vector<initial_vesting_balance_type> initial_vesting_balances;
|
vector<initial_balance_type> initial_balances;
|
||||||
int initial_active_witnesses = GRAPHENE_DEFAULT_NUM_WITNESSES;
|
vector<initial_vesting_balance_type> initial_vesting_balances;
|
||||||
vector<initial_witness_type> initial_witness_candidates;
|
int initial_active_witnesses = GRAPHENE_DEFAULT_NUM_WITNESSES;
|
||||||
// These are only candidates; the chain will have no active committee members at genesis
|
vector<initial_witness_type> initial_witness_candidates;
|
||||||
vector<initial_committee_member_type> initial_committee_candidates;
|
vector<initial_committee_member_type> initial_committee_candidates;
|
||||||
vector<initial_worker_type> initial_worker_candidates;
|
vector<initial_worker_type> initial_worker_candidates;
|
||||||
};
|
};
|
||||||
} } // namespace graphene::chain
|
} } // namespace graphene::chain
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -448,7 +448,7 @@ namespace graphene { namespace chain {
|
||||||
fee_schedule_type current_fees; ///< current schedule of fees
|
fee_schedule_type current_fees; ///< current schedule of fees
|
||||||
uint8_t block_interval = GRAPHENE_DEFAULT_BLOCK_INTERVAL; ///< interval in seconds between blocks
|
uint8_t block_interval = GRAPHENE_DEFAULT_BLOCK_INTERVAL; ///< interval in seconds between blocks
|
||||||
uint32_t maintenance_interval = GRAPHENE_DEFAULT_MAINTENANCE_INTERVAL; ///< interval in sections between blockchain maintenance events
|
uint32_t maintenance_interval = GRAPHENE_DEFAULT_MAINTENANCE_INTERVAL; ///< interval in sections between blockchain maintenance events
|
||||||
uint32_t genesis_proposal_review_period = GRAPHENE_DEFAULT_GENESIS_PROPOSAL_REVIEW_PERIOD_SEC; ///< minimum time in seconds that a proposed transaction requiring genesis authority may not be signed, prior to expiration
|
uint32_t committee_proposal_review_period = GRAPHENE_DEFAULT_COMMITTEE_PROPOSAL_REVIEW_PERIOD_SEC; ///< minimum time in seconds that a proposed transaction requiring committee authority may not be signed, prior to expiration
|
||||||
uint32_t maximum_transaction_size = GRAPHENE_DEFAULT_MAX_TRANSACTION_SIZE; ///< maximum allowable size in bytes for a transaction
|
uint32_t maximum_transaction_size = GRAPHENE_DEFAULT_MAX_TRANSACTION_SIZE; ///< maximum allowable size in bytes for a transaction
|
||||||
uint32_t maximum_block_size = GRAPHENE_DEFAULT_MAX_BLOCK_SIZE; ///< maximum allowable size in bytes for a block
|
uint32_t maximum_block_size = GRAPHENE_DEFAULT_MAX_BLOCK_SIZE; ///< maximum allowable size in bytes for a block
|
||||||
uint32_t maximum_undo_history = GRAPHENE_DEFAULT_MAX_UNDO_HISTORY; ///< maximum number of undo states to keep in RAM
|
uint32_t maximum_undo_history = GRAPHENE_DEFAULT_MAX_UNDO_HISTORY; ///< maximum number of undo states to keep in RAM
|
||||||
|
|
@ -499,8 +499,8 @@ namespace graphene { namespace chain {
|
||||||
"Block size limit is too low" );
|
"Block size limit is too low" );
|
||||||
FC_ASSERT( maximum_time_until_expiration > block_interval,
|
FC_ASSERT( maximum_time_until_expiration > block_interval,
|
||||||
"Maximum transaction expiration time must be greater than a block interval" );
|
"Maximum transaction expiration time must be greater than a block interval" );
|
||||||
FC_ASSERT( maximum_proposal_lifetime - genesis_proposal_review_period > block_interval,
|
FC_ASSERT( maximum_proposal_lifetime - committee_proposal_review_period > block_interval,
|
||||||
"Genesis proposal review period must be less than the maximum proposal lifetime" );
|
"Committee proposal review period must be less than the maximum proposal lifetime" );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -615,7 +615,7 @@ FC_REFLECT( graphene::chain::chain_parameters,
|
||||||
(current_fees)
|
(current_fees)
|
||||||
(block_interval)
|
(block_interval)
|
||||||
(maintenance_interval)
|
(maintenance_interval)
|
||||||
(genesis_proposal_review_period)
|
(committee_proposal_review_period)
|
||||||
(maximum_transaction_size)
|
(maximum_transaction_size)
|
||||||
(maximum_block_size)
|
(maximum_block_size)
|
||||||
(maximum_undo_history)
|
(maximum_undo_history)
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,7 @@ proposal_create_operation proposal_create_operation::genesis_proposal(const data
|
||||||
auto global_params = db.get_global_properties().parameters;
|
auto global_params = db.get_global_properties().parameters;
|
||||||
proposal_create_operation op = {account_id_type(), asset(), {},
|
proposal_create_operation op = {account_id_type(), asset(), {},
|
||||||
db.head_block_time() + global_params.maximum_proposal_lifetime,
|
db.head_block_time() + global_params.maximum_proposal_lifetime,
|
||||||
global_params.genesis_proposal_review_period};
|
global_params.committee_proposal_review_period};
|
||||||
op.fee = op.calculate_fee(global_params.current_fees);
|
op.fee = op.calculate_fee(global_params.current_fees);
|
||||||
return op;
|
return op;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ void_result proposal_create_evaluator::do_evaluate(const proposal_create_operati
|
||||||
}
|
}
|
||||||
if( auths.find(account_id_type()) != auths.end() )
|
if( auths.find(account_id_type()) != auths.end() )
|
||||||
FC_ASSERT( o.review_period_seconds
|
FC_ASSERT( o.review_period_seconds
|
||||||
&& *o.review_period_seconds >= global_parameters.genesis_proposal_review_period );
|
&& *o.review_period_seconds >= global_parameters.committee_proposal_review_period );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( const op_wrapper& op : o.proposed_ops )
|
for( const op_wrapper& op : o.proposed_ops )
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ BOOST_FIXTURE_TEST_CASE( update_account_keys, database_fixture )
|
||||||
generate_block( skip_flags );
|
generate_block( skip_flags );
|
||||||
|
|
||||||
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
||||||
p.parameters.genesis_proposal_review_period = fc::hours(1).to_seconds();
|
p.parameters.committee_proposal_review_period = fc::hours(1).to_seconds();
|
||||||
});
|
});
|
||||||
|
|
||||||
transaction tx;
|
transaction tx;
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE( genesis_authority )
|
||||||
// Signatures are for suckers.
|
// Signatures are for suckers.
|
||||||
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
||||||
// Turn the review period WAY down, so it doesn't take long to produce blocks to that point in simulated time.
|
// Turn the review period WAY down, so it doesn't take long to produce blocks to that point in simulated time.
|
||||||
p.parameters.genesis_proposal_review_period = fc::days(1).to_seconds();
|
p.parameters.committee_proposal_review_period = fc::days(1).to_seconds();
|
||||||
});
|
});
|
||||||
|
|
||||||
BOOST_TEST_MESSAGE( "transfering 100000 CORE to nathan, signing with genesis key" );
|
BOOST_TEST_MESSAGE( "transfering 100000 CORE to nathan, signing with genesis key" );
|
||||||
|
|
@ -378,19 +378,19 @@ BOOST_AUTO_TEST_CASE( genesis_authority )
|
||||||
|
|
||||||
proposal_create_operation pop;
|
proposal_create_operation pop;
|
||||||
pop.proposed_ops.push_back({trx.operations.front()});
|
pop.proposed_ops.push_back({trx.operations.front()});
|
||||||
pop.expiration_time = db.head_block_time() + global_params.genesis_proposal_review_period*2;
|
pop.expiration_time = db.head_block_time() + global_params.committee_proposal_review_period*2;
|
||||||
pop.fee_paying_account = nathan.id;
|
pop.fee_paying_account = nathan.id;
|
||||||
trx.operations = {pop};
|
trx.operations = {pop};
|
||||||
sign();
|
sign();
|
||||||
|
|
||||||
// The review period isn't set yet. Make sure it throws.
|
// The review period isn't set yet. Make sure it throws.
|
||||||
BOOST_REQUIRE_THROW( PUSH_TX( db, trx ), fc::exception );
|
BOOST_REQUIRE_THROW( PUSH_TX( db, trx ), fc::exception );
|
||||||
pop.review_period_seconds = global_params.genesis_proposal_review_period / 2;
|
pop.review_period_seconds = global_params.committee_proposal_review_period / 2;
|
||||||
trx.operations.back() = pop;
|
trx.operations.back() = pop;
|
||||||
sign();
|
sign();
|
||||||
// The review period is too short. Make sure it throws.
|
// The review period is too short. Make sure it throws.
|
||||||
BOOST_REQUIRE_THROW( PUSH_TX( db, trx ), fc::exception );
|
BOOST_REQUIRE_THROW( PUSH_TX( db, trx ), fc::exception );
|
||||||
pop.review_period_seconds = global_params.genesis_proposal_review_period;
|
pop.review_period_seconds = global_params.committee_proposal_review_period;
|
||||||
trx.operations.back() = pop;
|
trx.operations.back() = pop;
|
||||||
sign();
|
sign();
|
||||||
proposal_object prop = db.get<proposal_object>(PUSH_TX( db, trx ).operation_results.front().get<object_id_type>());
|
proposal_object prop = db.get<proposal_object>(PUSH_TX( db, trx ).operation_results.front().get<object_id_type>());
|
||||||
|
|
@ -456,7 +456,7 @@ BOOST_FIXTURE_TEST_CASE( fired_delegates, database_fixture )
|
||||||
|
|
||||||
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
||||||
// Turn the review period WAY down, so it doesn't take long to produce blocks to that point in simulated time.
|
// Turn the review period WAY down, so it doesn't take long to produce blocks to that point in simulated time.
|
||||||
p.parameters.genesis_proposal_review_period = fc::days(1).to_seconds();
|
p.parameters.committee_proposal_review_period = fc::days(1).to_seconds();
|
||||||
});
|
});
|
||||||
|
|
||||||
for( int i = 0; i < 15; ++i )
|
for( int i = 0; i < 15; ++i )
|
||||||
|
|
@ -840,7 +840,7 @@ BOOST_FIXTURE_TEST_CASE( max_authority_membership, database_fixture )
|
||||||
generate_block();
|
generate_block();
|
||||||
|
|
||||||
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
||||||
p.parameters.genesis_proposal_review_period = fc::hours(1).to_seconds();
|
p.parameters.committee_proposal_review_period = fc::hours(1).to_seconds();
|
||||||
});
|
});
|
||||||
|
|
||||||
transaction tx;
|
transaction tx;
|
||||||
|
|
|
||||||
|
|
@ -622,7 +622,7 @@ BOOST_FIXTURE_TEST_CASE( change_block_interval, database_fixture )
|
||||||
generate_block();
|
generate_block();
|
||||||
|
|
||||||
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
||||||
p.parameters.genesis_proposal_review_period = fc::hours(1).to_seconds();
|
p.parameters.committee_proposal_review_period = fc::hours(1).to_seconds();
|
||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -829,7 +829,7 @@ BOOST_FIXTURE_TEST_CASE( pop_block_twice, database_fixture )
|
||||||
generate_block( skip_flags );
|
generate_block( skip_flags );
|
||||||
|
|
||||||
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
db.modify(db.get_global_properties(), [](global_property_object& p) {
|
||||||
p.parameters.genesis_proposal_review_period = fc::hours(1).to_seconds();
|
p.parameters.committee_proposal_review_period = fc::hours(1).to_seconds();
|
||||||
});
|
});
|
||||||
|
|
||||||
transaction tx;
|
transaction tx;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue