peerplays_migrated/libraries/chain/include/graphene/chain/protocol/witness.hpp
2015-07-15 12:36:26 -04:00

34 lines
1.2 KiB
C++

#pragma once
#include <graphene/chain/protocol/base.hpp>
namespace graphene { namespace chain {
/**
* @brief Create a witness object, as a bid to hold a witness position on the network.
* @ingroup operations
*
* Accounts which wish to become witnesses may use this operation to create a witness object which stakeholders may
* vote on to approve its position as a witness.
*/
struct witness_create_operation : public base_operation
{
struct fee_parameters_type { uint64_t fee = 5000 * GRAPHENE_BLOCKCHAIN_PRECISION; };
asset fee;
/// The account which owns the witness. This account pays the fee for this operation.
account_id_type witness_account;
string url;
public_key_type block_signing_key;
secret_hash_type initial_secret;
account_id_type fee_payer()const { return witness_account; }
void validate()const;
};
/// TODO: witness_resign_operation : public base_operation
} } // graphene::chain
FC_REFLECT( graphene::chain::witness_create_operation::fee_parameters_type, (fee) )
FC_REFLECT( graphene::chain::witness_create_operation, (fee)(witness_account)(url)(block_signing_key)(initial_secret) )