useNode method fails for two reason: if the node is not in the connection set (if it was never connected/contacted for example) and if the node is not currently connected. Both these failures represent as return false error code. This makes impossible for clients to enforce different policies (for example, dhtproto could use no_node vs node_disconnected error to differentiate between these two error codes).
useNode
method fails for two reason: if the node is not in the connection set (if it was never connected/contacted for example) and if the node is not currently connected. Both these failures represent asreturn false
error code. This makes impossible for clients to enforce different policies (for example,dhtproto
could useno_node
vsnode_disconnected
error to differentiate between these two error codes).See also: https://github.com/sociomantic-tsunami/swarm/pull/371