Since the current node id can be obtained using the function gtmnid() the queries for finding out whether a node is in the quorum and whether it is softfailed can be made simpler.