isNodeDownstream function

Check if a node is downstream or upstream another one