diff --git a/utils/config-generator.py b/utils/config-generator.py index 46f403c5a..81e6424af 100755 --- a/utils/config-generator.py +++ b/utils/config-generator.py @@ -762,11 +762,14 @@ def create_node_snapshot_config_json(history_mode): and s.get("chain_name") == network_name ] if octez_version: - matching_snapshots = [ + version_matching_snapshots = [ s for s in matching_snapshots if int(octez_version) == s.get("tezos_version").get("version").get("major") ] + if len(version_matching_snapshots): + # If we can't find snapshots of the right octez version, we just pick the most recent available. + matching_snapshots = version_matching_snapshots matching_snapshots = sorted(matching_snapshots, key=lambda s: s.get("block_height")) return matching_snapshots[-1] if len(matching_snapshots) else None