pushing of account_created_operation moved to post transaction processing phase in apply_block
related to: !296 (merged)
Field trx_in_block
in operation notification hived have two roles: represent position of transaction in block and determining is given operation comes from evaluation of [normal] operation, or it comes from internal hived actions (e.g. hardforks).
If some virtual operation is type 2 (comes from internal chain actions) trx_in_block
is set to -1, otherwise it "points to" a transaction that contains an operation which is direct parent of given virtual operation.
After !296 (merged) four new virtual operations appear in account_history; all of them are account_created_operation
. In current version all of them has trx_in_block
set to 0 which suggest there is an operation they refer to, which does not exist.
My proposal is to change these virtual operation from type 1 (comes from normal operation) to type 2, by moving the place in code where these vops are generated.
In database made by sql_serializer
it makes inconsistency, because if trx_in_block
is not set to -1, there is performed lookup for referred operation. By changing type of those 4 operation it's clear that these are system accounts, everybody who needs information about account creation are also informed and consistency is kept.
I've added quick comparison in attachment