This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve #1: Replace operations with messages
I've already removed operations from the system; in this commit I add a new message type and integrate it into the transaction type.
- Loading branch information
1 parent
07f027c
commit 897dbaf
Showing
3 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
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,32 @@ | ||
#pragma once | ||
|
||
#include <eos/chain/protocol/types.hpp> | ||
|
||
namespace eos { namespace chain { | ||
|
||
/** | ||
* @brief The message struct defines a blockchain message | ||
* | ||
* Messages are the heart of all activity on the blockchain -- all events and actions which take place in the chain are | ||
* recorded as messages. Messages are sent from one account (@ref sender) to another account (@ref recipient), and are | ||
* optionally also delivered to several other accounts (@ref notify_accounts). | ||
* | ||
* A message has a header that defines who sent it and who will be processing it. The message content is a binary blob, | ||
* @ref data, whose type is determined by @ref type, which is dynamic and defined by the scripting language. | ||
*/ | ||
struct message { | ||
/// The account which sent the message | ||
account sender; | ||
/// The account to receive the message | ||
account recipient; | ||
/// Other accounts to notify about this message | ||
vector<account> notify_accounts; | ||
/// The message type -- this is defined by the contract(s) which create and/or process this message | ||
message_type type; | ||
/// The message contents | ||
vector<char> data; | ||
}; | ||
|
||
} } // namespace eos::chain | ||
|
||
FC_REFLECT(eos::chain::message, (sender)(recipient)(notify_accounts)(type)(data)) |
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