private NodeCrashException failNode(int node) {
        NodeCrashException crash = null;

        if (isNodeValid(node)) {
            Node crashingNode = nodes.get(node);
            try {
                crashingNode.fail();
            } catch (NodeCrashException e) {
                crash = e;
            }

            logEventWithNodeField(crashingNode, "FAILURE");

            nodes.remove(node);
            crashedNodes.add(node);

            Iterator<Timeout> iter = waitingTOs.iterator();
            while (iter.hasNext()) {
                Timeout to = iter.next();
                if (to.node.addr == node) {
                	iter.remove();
                }
            }
            iter = currentTimeouts.iterator();
            while (iter.hasNext()) {
                Timeout to = iter.next();
                if (to.node.addr == node) {
                	iter.remove();
                }
            }
        }

        return crash;
    }