Blocks should allow for generated transactions to have output
Related to #127
As of right now, a block at the lowest level (thread) consists of user_input and generated_input both of which are lists of transactions processed in that block (from users and generated in previous blocks respectively).
While user_input is an array of ProcessedTransaction s that include a list of MessageOutput s, the generated_input is just an array of transaction ids.
For now the resolution is to create a ProcessedGeneratedTransaction that contains the id of the generated transaction and any MessageOutput that results from the application of that transaction.
This leaves generated transactions and incoming user transactions segregated at the block level implying, among other things, that for any given thread all generated transactions will be scheduled before any user transactions. After discussion, desegregating these transaction types was non-trivial and had questionable benefits so, for now, it is not being pursued.
What about reorganizing the Transaction type like so:
struct Transaction
scope AccountName[] # the data may be accessed while processing this transaction
messages Message[]
struct UserTransaction inherits Transaction
refBlockNum UInt16
refBlockPrefix UInt32
expiration Time
struct SignedTransaction inherits UserTransaction
signatures Signature[]
struct GeneratedTransaction inherits Transaction
parent TransactionId # May be a UserTransaction or a GeneratedTransaction
And then a ProcessedTransaction would have a variant member which is either a SignedTransaction or a GeneratedTransaction
Does that make things better?