neo
neo copied to clipboard
NeoSystem should send Blockchain.Initialize in StartNode instead of constructor
The last line of the NeoSystem constructor is Blockchain.Ask(new Blockchain.Initialize()).Wait();, which configures the blockchain actor. However, it's not possible to register for any of EventStream events that the Blockchain actor publishes (ApplicationExecuted, PersistCompleted and RelayResult) until after the blockchain is initialized and the genesis block created.
Shouldn't the Initialize message be sent to the blockchain actor at the top of StartNode instead of the end of the constructor?
At least before plugins load, isn't it?
Shouldn't the
Initializemessage be sent to the blockchain actor at the top of StartNode instead of the end of the constructor?
What do you mean top of the StartNode?
Do you want to register event subscriber before genesis block?
What do you mean
top of the StartNode? Do you want to register event subscriber before genesis block?
I mean the beginning of StartNode, so that someone can register for events before the genesis block is minted.
What do you mean
top of the StartNode? Do you want to register event subscriber before genesis block?I mean the beginning of
StartNode, so that someone can register for events before the genesis block is minted.
I see.