start_son_maintenance CLI call
This commit is contained in:
parent
1a021734af
commit
8a926c29b4
2 changed files with 32 additions and 2 deletions
|
|
@ -1350,9 +1350,18 @@ class wallet_api
|
|||
signed_transaction delete_son(string owner_account,
|
||||
bool broadcast = false);
|
||||
|
||||
/** Modify status of the SON owned by the given account to maintenance.
|
||||
*
|
||||
* @param owner_account the name or id of the account which is owning the SON
|
||||
* @param broadcast true to broadcast the transaction on the network
|
||||
* @returns the signed transaction
|
||||
*/
|
||||
signed_transaction start_son_maintenance(string owner_account,
|
||||
bool broadcast = false);
|
||||
|
||||
/** Modify status of the SON owned by the given account back to active.
|
||||
*
|
||||
* @param owner_account the name or id of the account which is creating the witness
|
||||
* @param owner_account the name or id of the account which is owning the SON
|
||||
* @param broadcast true to broadcast the transaction on the network
|
||||
* @returns the signed transaction
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1939,6 +1939,23 @@ public:
|
|||
return sign_transaction( tx, broadcast );
|
||||
} FC_CAPTURE_AND_RETHROW( (owner_account)(broadcast) ) }
|
||||
|
||||
signed_transaction start_son_maintenance(string owner_account,
|
||||
bool broadcast)
|
||||
{ try {
|
||||
son_object son = get_son(owner_account);
|
||||
|
||||
son_maintenance_operation op;
|
||||
op.owner_account = son.son_account;
|
||||
op.son_id = son.id;
|
||||
|
||||
signed_transaction tx;
|
||||
tx.operations.push_back( op );
|
||||
set_operation_fees( tx, _remote_db->get_global_properties().parameters.current_fees );
|
||||
tx.validate();
|
||||
|
||||
return sign_transaction( tx, broadcast );
|
||||
} FC_CAPTURE_AND_RETHROW( (owner_account) ) }
|
||||
|
||||
signed_transaction stop_son_maintenance(string owner_account,
|
||||
bool broadcast)
|
||||
{ try {
|
||||
|
|
@ -1957,7 +1974,6 @@ public:
|
|||
return sign_transaction( tx, broadcast );
|
||||
} FC_CAPTURE_AND_RETHROW( (owner_account) ) }
|
||||
|
||||
|
||||
map<string, son_id_type> list_active_sons()
|
||||
{ try {
|
||||
global_property_object gpo = get_global_properties();
|
||||
|
|
@ -4422,6 +4438,11 @@ signed_transaction wallet_api::delete_son(string owner_account,
|
|||
return my->delete_son(owner_account, broadcast);
|
||||
}
|
||||
|
||||
signed_transaction wallet_api::start_son_maintenance(string owner_account, bool broadcast)
|
||||
{
|
||||
return my->start_son_maintenance(owner_account, broadcast);
|
||||
}
|
||||
|
||||
signed_transaction wallet_api::stop_son_maintenance(string owner_account, bool broadcast)
|
||||
{
|
||||
return my->stop_son_maintenance(owner_account, broadcast);
|
||||
|
|
|
|||
Loading…
Reference in a new issue