Upgrades the snapshots by adding the blockhash to it and to any pending transactions

def _transform_snapshots_for_blockhash(storage: SQLiteStorage, cache: BlockHashCache) -> None:
    """Upgrades the snapshots by adding the blockhash to it and to any pending transactions"""

    snapshots = storage.get_snapshots()
    snapshot_records = [
        TransformSnapshotRecord(
            data=snapshot.data,
            identifier=snapshot.identifier,
            storage=storage,
            cache=cache,
        )
        for snapshot in snapshots
    ]

    pool_generator = Pool(len(snapshots)).imap(_do_transform_snapshot, snapshot_records)

    updated_snapshots_data = []
    for result in pool_generator:
        updated_snapshots_data.append(result)

    storage.update_snapshots(updated_snapshots_data)