Describe the enhancement
There is a fair amount of state tied in the Node struct that could be removed in favor of sans-I/O state machine. This state machine will just negotiate the construction of messages with Chain, and react to inbound events. The Node can simply alter this state and poll it for information.
Use case
For one it would be nice to test the top level Node structure with more scrutiny. Abstracting the state of the node also allows for future additions of a blocking interface.
Describe the enhancement
There is a fair amount of state tied in the
Nodestruct that could be removed in favor of sans-I/O state machine. This state machine will just negotiate the construction of messages withChain, and react to inbound events. TheNodecan simply alter this state and poll it for information.Use case
For one it would be nice to test the top level
Nodestructure with more scrutiny. Abstracting the state of the node also allows for future additions of a blocking interface.