From 3a76aac09421492a0e2c750a3dabcfd64ca3b729 Mon Sep 17 00:00:00 2001 From: Neylix Date: Mon, 9 Sep 2024 14:16:39 +0200 Subject: [PATCH] Fix 1.5.9 appup async --- lib/archethic/crypto/keystore/node/software_impl.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/archethic/crypto/keystore/node/software_impl.ex b/lib/archethic/crypto/keystore/node/software_impl.ex index 34cda3143..a9b339e2d 100644 --- a/lib/archethic/crypto/keystore/node/software_impl.ex +++ b/lib/archethic/crypto/keystore/node/software_impl.ex @@ -233,19 +233,19 @@ defmodule Archethic.Crypto.NodeKeystore.SoftwareImpl do @impl GenServer # FIXME: use genserver message because ets table is protected - def handle_cast(:migrate_1_5_9, state) do + def handle_call(:migrate_1_5_9, _from, state) do node_seed = Origin.retrieve_node_seed() :ets.insert(@keystore_table, {:node_seed, node_seed}) :ets.delete(@keystore_table, :sign_fun) :ets.delete(@keystore_table, :public_key_fun) :ets.delete(@keystore_table, :dh_fun) - {:noreply, state} + {:reply, :ok, state} end # FIXME: to remove after 1.5.9 @doc false def migrate_ets_table_1_5_9 do - GenServer.cast(__MODULE__, :migrate_1_5_9) + GenServer.call(__MODULE__, :migrate_1_5_9) end end