Skip to content

Commit

Permalink
Fix 1.5.9 appup async
Browse files Browse the repository at this point in the history
  • Loading branch information
Neylix committed Sep 9, 2024
1 parent f3cd61e commit 3a76aac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/archethic/crypto/keystore/node/software_impl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3a76aac

Please sign in to comment.