tests/Cluster.py
def waitOnClusterBlockNumSync(self, targetBlockNum, timeout=None):
        """Wait for all nodes to have targetBlockNum finalized."""
        assert(self.nodes)

        def doNodesHaveBlockNum(nodes, targetBlockNum):
            for node in nodes:
                try:
                    if (not node.killed) and (not node.isBlockPresent(targetBlockNum)):
                    #if (not node.killed) and (not node.isBlockFinalized(targetBlockNum)):
                        return False
                except (TypeError) as _:
                    # This can happen if client connects before server is listening
                    return False

            return True

        lam = lambda: doNodesHaveBlockNum(self.nodes, targetBlockNum)
        ret=Utils.waitForBool(lam, timeout)
        return ret
Wait for all nodes to have targetBlockNum finalized.
Wait for all nodes to have targetBlockNum finalized.
Wait for all nodes to have targetBlockNum finalized .
def waitOnClusterBlockNumSync(self, targetBlockNum, timeout=None):
        assert(self.nodes)
        def doNodesHaveBlockNum(nodes, targetBlockNum):
            for node in nodes:
                try:
                    if (not node.killed) and (not node.isBlockPresent(targetBlockNum)):
                        return False
                except (TypeError) as _:
                    return False
            return True
        lam = lambda: doNodesHaveBlockNum(self.nodes, targetBlockNum)
        ret=Utils.waitForBool(lam, timeout)
        return ret
def waitOnClusterBlockNumSync ( self , targetBlockNum , timeout = None ) : assert ( self . nodes ) def doNodesHaveBlockNum ( nodes , targetBlockNum ) : for node in nodes : try : if ( not node . killed ) and ( not node . isBlockPresent ( targetBlockNum ) ) : return False except ( TypeError ) as _ : return False return True lam = lambda : doNodesHaveBlockNum ( self . nodes , targetBlockNum ) ret = Utils . waitForBool ( lam , timeout ) return ret
Wait for all nodes to have targetBlockNum finalized.
Wait for all nodes to have targetBlockNum finalized .
"""Wait for all nodes to have targetBlockNum finalized.""" #if (not node.killed) and (not node.isBlockFinalized(targetBlockNum)): # This can happen if client connects before server is listening
self
targetBlockNum
timeout