forked from quanchainos/steem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5c7ce5
commit e48f977
Showing
4 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
libraries/protocol/include/steem/protocol/automated_actions.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include <steem/protocol/steem_actions.hpp> | ||
|
||
#include <steem/protocol/operation_util.hpp> | ||
|
||
namespace steem { namespace protocol { | ||
|
||
/** NOTE: do not change the order of any actions or it will trigger a hardfork. | ||
*/ | ||
typedef fc::static_variant< | ||
required_action, | ||
optional_action | ||
> automated_action; | ||
|
||
} } // steem::protocol | ||
|
||
STEEM_DECLARE_OPERATION_TYPE( steem::protocol::automated_action ); | ||
FC_REFLECT_TYPENAME( steem::protocol::automated_action ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
libraries/protocol/include/steem/protocol/steem_actions.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
#include <steem/protocol/base.hpp> | ||
#include <steem/protocol/block_header.hpp> | ||
#include <steem/protocol/asset.hpp> | ||
#include <steem/protocol/validation.hpp> | ||
#include <steem/protocol/legacy_asset.hpp> | ||
|
||
#include <fc/crypto/equihash.hpp> | ||
|
||
namespace steem { namespace protocol { | ||
|
||
typedef base_operation base_action; | ||
|
||
struct required_action : public base_action | ||
{ | ||
account_name_type account; | ||
|
||
void validate()const; | ||
void get_required_active_authorities( flat_set<account_name_type>& a )const{ a.insert(account); } | ||
}; | ||
|
||
struct optional_action : public base_action | ||
{ | ||
account_name_type account; | ||
|
||
void validate()const; | ||
void get_required_active_authorities( flat_set<account_name_type>& a )const{ a.insert(account); } | ||
}; | ||
|
||
} } // steem::protocol | ||
|
||
FC_REFLECT( steem::protocol::required_action, (account) ) | ||
FC_REFLECT( steem::protocol::optional_action, (account) ) |