def sync_blocks(self, nodes=None, wait=1, timeout=60):
    "\n        Wait until everybody has the same tip.\n        sync_blocks needs to be called with an rpc_connections set that has least\n        one node already synced to the latest, stable tip, otherwise there's a\n        chance it might return before all nodes are stably synced.\n        "
    rpc_connections = (nodes or self.nodes)
    stop_time = (time.time() + timeout)
    while (time.time() <= stop_time):
        best_hash = [x.getbestblockhash() for x in rpc_connections]
        if (best_hash.count(best_hash[0]) == len(rpc_connections)):
            return
        assert all([len(x.getpeerinfo()) for x in rpc_connections])
        time.sleep(wait)
    raise AssertionError('Block sync timed out after {}s:{}'.format(timeout, ''.join(('\n  {!r}'.format(b) for b in best_hash))))
Wait until everybody has the same tip.
sync_blocks needs to be called with an rpc_connections set that has least
one node already synced to the latest, stable tip, otherwise there's a
chance it might return before all nodes are stably synced.
def sync_blocks(self, nodes=None, wait=1, timeout=60):
    "\n        Wait until everybody has the same tip.\n        sync_blocks needs to be called with an rpc_connections set that has least\n        one node already synced to the latest, stable tip, otherwise there's a\n        chance it might return before all nodes are stably synced.\n        "
    rpc_connections = (nodes or self.nodes)
    stop_time = (time.time() + timeout)
    while (time.time() <= stop_time):
        best_hash = [x.getbestblockhash() for x in rpc_connections]
        if (best_hash.count(best_hash[0]) == len(rpc_connections)):
            return
        assert all([len(x.getpeerinfo()) for x in rpc_connections])
        time.sleep(wait)
    raise AssertionError('Block sync timed out after {}s:{}'.format(timeout, .join(('\n  {!r}'.format(b) for b in best_hash))))