diff --git a/libraries/chain/protocol/proposal.cpp b/libraries/chain/protocol/proposal.cpp index 46ca683d..e4cc71a3 100644 --- a/libraries/chain/protocol/proposal.cpp +++ b/libraries/chain/protocol/proposal.cpp @@ -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 ) { + // TODO move this method to unit tests as it is not useful proposal_create_operation op; op.expiration_time = head_block_time + global_params.maximum_proposal_lifetime; op.review_period_seconds = global_params.committee_proposal_review_period; diff --git a/libraries/wallet/include/graphene/wallet/wallet.hpp b/libraries/wallet/include/graphene/wallet/wallet.hpp index 160a2e81..04e96f63 100644 --- a/libraries/wallet/include/graphene/wallet/wallet.hpp +++ b/libraries/wallet/include/graphene/wallet/wallet.hpp @@ -1267,12 +1267,14 @@ class wallet_api * desired. * * @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 broadcast true if you wish to broadcast the transaction * @return the signed version of the transaction */ signed_transaction propose_parameter_change( const string& proposing_account, + fc::time_point_sec expiration_time, const variant_object& changed_values, bool broadcast = false); diff --git a/libraries/wallet/wallet.cpp b/libraries/wallet/wallet.cpp index d55c5edb..db5ca65b 100644 --- a/libraries/wallet/wallet.cpp +++ b/libraries/wallet/wallet.cpp @@ -1965,6 +1965,7 @@ public: signed_transaction propose_parameter_change( const string& proposing_account, + fc::time_point_sec expiration_time, const variant_object& changed_values, bool broadcast = false) { @@ -1979,8 +1980,10 @@ public: committee_member_update_global_parameters_operation update_op; update_op.new_parameters = new_params; - proposal_create_operation prop_op = proposal_create_operation::committee_proposal( - current_params, get_dynamic_global_properties().time ); + proposal_create_operation prop_op; + + 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.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( const string& proposing_account, + fc::time_point_sec expiration_time, const variant_object& changed_values, 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(