Conversation
| * (e.g. if it is a first launch of a node) None is to be returned | ||
| */ | ||
| def restoreState(): Option[NodeView] | ||
| protected def restoreHistory(): Option[History] |
There was a problem hiding this comment.
Shouldn't this method be moved in StateHistoryActor now, as there are no state and history variables now in NVH?
There was a problem hiding this comment.
I think that you are right and these should be moved to the correspondent actors
| * (e.g. if it is a first launch of a node) None is to be returned | ||
| */ | ||
| protected def genesisState: NodeView | ||
| protected def restoreState(): Option[State] |
| /** Restore a local memory pool during a node startup. If no any stored view found | ||
| * (e.g. if it is a first launch of a node) None is to be returned | ||
| */ | ||
| protected def restoreMempool(): Option[MPool] |
| protected def memoryPool(): MP = nodeView._4 | ||
| /** Hard-coded initial state all the honest nodes in a network are making progress from | ||
| */ | ||
| protected def genesisState(): State |
There was a problem hiding this comment.
How these direct readers are expected to be used from NVH when state and history aren't available directly from NVH?
There was a problem hiding this comment.
This was expected to be used for component actors initialization, as in Hybrid example. But you're probably right, this should be moved to actors itself
| protected def vault(): VL = nodeView._3 | ||
| /** Hard-coded initial history all the honest nodes in a network are making progress from | ||
| */ | ||
| protected def genesisHistory(): History |
| context.system.eventStream.publish(SuccessfulTransaction[TX](tx)) | ||
| /** Hard-coded initial history all the honest nodes in a network are making progress from | ||
| */ | ||
| protected def genesisMempool(): MPool |
| */ | ||
| protected val memoryPoolActor: ActorRef = createMemoryPoolActor() | ||
|
|
||
| protected var vault: Vault = restoreVault().getOrElse(genesisVault()) |
There was a problem hiding this comment.
Why isn't vault implemented as an actor?
There was a problem hiding this comment.
Yes, this definitely should be implemented as an actor, I just did not manage to do it in time. Please fix this
Fixes #325