Issue #67 - add url to delegate/witness create operation
This commit is contained in:
parent
da4bf0adc2
commit
b5b9d6d053
3 changed files with 9 additions and 4 deletions
|
|
@ -87,7 +87,8 @@
|
|||
#define GRAPHENE_GENESIS_TIMESTAMP (1431700000) /// Should be divisible by GRAPHENE_DEFAULT_BLOCK_INTERVAL
|
||||
|
||||
#define GRAPHENE_MAX_WORKER_NAME_LENGTH 63
|
||||
#define GRAPHENE_MAX_WORKER_URL_LENGTH 127
|
||||
|
||||
#define GRAPHENE_MAX_URL_LENGTH 127
|
||||
|
||||
// counter initialization values used to derive near and far future seeds for shuffling witnesses
|
||||
// we use the fractional bits of sqrt(2) in hex
|
||||
|
|
|
|||
|
|
@ -314,6 +314,7 @@ namespace graphene { namespace chain {
|
|||
asset fee;
|
||||
/// The account which owns the delegate. This account pays the fee for this operation.
|
||||
account_id_type delegate_account;
|
||||
string url;
|
||||
|
||||
account_id_type fee_payer()const { return delegate_account; }
|
||||
void get_required_auth(flat_set<account_id_type>& active_auth_set, flat_set<account_id_type>&)const;
|
||||
|
|
@ -334,6 +335,7 @@ namespace graphene { namespace chain {
|
|||
asset fee;
|
||||
/// The account which owns the delegate. This account pays the fee for this operation.
|
||||
account_id_type witness_account;
|
||||
string url;
|
||||
key_id_type block_signing_key;
|
||||
secret_hash_type initial_secret;
|
||||
|
||||
|
|
@ -1543,9 +1545,9 @@ FC_REFLECT( graphene::chain::account_whitelist_operation, (fee)(authorizing_acco
|
|||
FC_REFLECT( graphene::chain::account_transfer_operation, (fee)(account_id)(new_owner) )
|
||||
|
||||
FC_REFLECT( graphene::chain::delegate_create_operation,
|
||||
(fee)(delegate_account) )
|
||||
(fee)(delegate_account)(url) )
|
||||
|
||||
FC_REFLECT( graphene::chain::witness_create_operation, (fee)(witness_account)(block_signing_key)(initial_secret) )
|
||||
FC_REFLECT( graphene::chain::witness_create_operation, (fee)(witness_account)(url)(block_signing_key)(initial_secret) )
|
||||
FC_REFLECT( graphene::chain::witness_withdraw_pay_operation, (fee)(from_witness)(to_account)(amount) )
|
||||
|
||||
FC_REFLECT( graphene::chain::limit_order_create_operation,
|
||||
|
|
|
|||
|
|
@ -341,6 +341,7 @@ void delegate_create_operation::get_required_auth(flat_set<account_id_type>& act
|
|||
void delegate_create_operation::validate()const
|
||||
{
|
||||
FC_ASSERT( fee.amount >= 0 );
|
||||
FC_ASSERT(url.size() < GRAPHENE_MAX_URL_LENGTH );
|
||||
}
|
||||
|
||||
void asset_fund_fee_pool_operation::get_required_auth(flat_set<account_id_type>& active_auth_set, flat_set<account_id_type>&) const
|
||||
|
|
@ -539,6 +540,7 @@ void witness_create_operation::get_required_auth(flat_set<graphene::chain::accou
|
|||
void witness_create_operation::validate() const
|
||||
{
|
||||
FC_ASSERT(fee.amount >= 0);
|
||||
FC_ASSERT(url.size() < GRAPHENE_MAX_URL_LENGTH );
|
||||
}
|
||||
|
||||
share_type witness_create_operation::calculate_fee(const fee_schedule_type& k) const
|
||||
|
|
@ -779,7 +781,7 @@ void worker_create_operation::validate() const
|
|||
FC_ASSERT(daily_pay > 0);
|
||||
FC_ASSERT(daily_pay < GRAPHENE_BLOCKCHAIN_MAX_SHARES);
|
||||
FC_ASSERT(name.size() < GRAPHENE_MAX_WORKER_NAME_LENGTH );
|
||||
FC_ASSERT(url.size() < GRAPHENE_MAX_WORKER_URL_LENGTH );
|
||||
FC_ASSERT(url.size() < GRAPHENE_MAX_URL_LENGTH );
|
||||
}
|
||||
|
||||
share_type worker_create_operation::calculate_fee(const fee_schedule_type& k) const
|
||||
|
|
|
|||
Loading…
Reference in a new issue