cli_wallet: Improve propose_parameter_change interface
This commit is contained in:
parent
650af1778d
commit
96e8f8dd6d
3 changed files with 10 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ namespace graphene { namespace chain {
|
||||||
|
|
||||||
proposal_create_operation proposal_create_operation::committee_proposal(const chain_parameters& global_params, fc::time_point_sec head_block_time )
|
proposal_create_operation proposal_create_operation::committee_proposal(const chain_parameters& global_params, fc::time_point_sec head_block_time )
|
||||||
{
|
{
|
||||||
|
// TODO move this method to unit tests as it is not useful
|
||||||
proposal_create_operation op;
|
proposal_create_operation op;
|
||||||
op.expiration_time = head_block_time + global_params.maximum_proposal_lifetime;
|
op.expiration_time = head_block_time + global_params.maximum_proposal_lifetime;
|
||||||
op.review_period_seconds = global_params.committee_proposal_review_period;
|
op.review_period_seconds = global_params.committee_proposal_review_period;
|
||||||
|
|
|
||||||
|
|
@ -1267,12 +1267,14 @@ class wallet_api
|
||||||
* desired.
|
* desired.
|
||||||
*
|
*
|
||||||
* @param proposing_account The account paying the fee to propose the tx
|
* @param proposing_account The account paying the fee to propose the tx
|
||||||
|
* @param expiration_time Timestamp specifying when the proposal will either take effect or expire.
|
||||||
* @param changed_values The values to change; all other chain parameters are filled in with default values
|
* @param changed_values The values to change; all other chain parameters are filled in with default values
|
||||||
* @param broadcast true if you wish to broadcast the transaction
|
* @param broadcast true if you wish to broadcast the transaction
|
||||||
* @return the signed version of the transaction
|
* @return the signed version of the transaction
|
||||||
*/
|
*/
|
||||||
signed_transaction propose_parameter_change(
|
signed_transaction propose_parameter_change(
|
||||||
const string& proposing_account,
|
const string& proposing_account,
|
||||||
|
fc::time_point_sec expiration_time,
|
||||||
const variant_object& changed_values,
|
const variant_object& changed_values,
|
||||||
bool broadcast = false);
|
bool broadcast = false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1965,6 +1965,7 @@ public:
|
||||||
|
|
||||||
signed_transaction propose_parameter_change(
|
signed_transaction propose_parameter_change(
|
||||||
const string& proposing_account,
|
const string& proposing_account,
|
||||||
|
fc::time_point_sec expiration_time,
|
||||||
const variant_object& changed_values,
|
const variant_object& changed_values,
|
||||||
bool broadcast = false)
|
bool broadcast = false)
|
||||||
{
|
{
|
||||||
|
|
@ -1979,8 +1980,10 @@ public:
|
||||||
committee_member_update_global_parameters_operation update_op;
|
committee_member_update_global_parameters_operation update_op;
|
||||||
update_op.new_parameters = new_params;
|
update_op.new_parameters = new_params;
|
||||||
|
|
||||||
proposal_create_operation prop_op = proposal_create_operation::committee_proposal(
|
proposal_create_operation prop_op;
|
||||||
current_params, get_dynamic_global_properties().time );
|
|
||||||
|
prop_op.expiration_time = expiration_time;
|
||||||
|
prop_op.review_period_seconds = current_params.committee_proposal_review_period;
|
||||||
prop_op.fee_paying_account = get_account(proposing_account).id;
|
prop_op.fee_paying_account = get_account(proposing_account).id;
|
||||||
|
|
||||||
prop_op.proposed_ops.emplace_back( update_op );
|
prop_op.proposed_ops.emplace_back( update_op );
|
||||||
|
|
@ -2863,11 +2866,12 @@ void wallet_api::flood_network(string prefix, uint32_t number_of_transactions)
|
||||||
|
|
||||||
signed_transaction wallet_api::propose_parameter_change(
|
signed_transaction wallet_api::propose_parameter_change(
|
||||||
const string& proposing_account,
|
const string& proposing_account,
|
||||||
|
fc::time_point_sec expiration_time,
|
||||||
const variant_object& changed_values,
|
const variant_object& changed_values,
|
||||||
bool broadcast /* = false */
|
bool broadcast /* = false */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return my->propose_parameter_change( proposing_account, changed_values, broadcast );
|
return my->propose_parameter_change( proposing_account, expiration_time, changed_values, broadcast );
|
||||||
}
|
}
|
||||||
|
|
||||||
signed_transaction wallet_api::propose_fee_change(
|
signed_transaction wallet_api::propose_fee_change(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue