updateNodeState

Update the state of a node.