diff --git a/lib/archethic/crypto/keystore/shared_secrets/software_impl.ex b/lib/archethic/crypto/keystore/shared_secrets/software_impl.ex index 1e4f401a6..d424d8496 100644 --- a/lib/archethic/crypto/keystore/shared_secrets/software_impl.ex +++ b/lib/archethic/crypto/keystore/shared_secrets/software_impl.ex @@ -58,23 +58,6 @@ defmodule Archethic.Crypto.SharedSecretsKeystore.SoftwareImpl do end @impl GenServer - def code_change(1, state, _extra) do - [reward_sign_fun] = :ets.take(@keystore_table, :network_pool_sign_fun) - [reward_public_key_fun] = :ets.take(@keystore_table, :network_pool_public_key_fun) - [reward_seed_wrap_fun] = :ets.take(@keystore_table, :network_pool_seed_wrap_fun) - - :ets.insert(@keystore_table, {:reward_sign_fun, reward_sign_fun}) - :ets.insert(@keystore_table, {:reward_public_key_fun, reward_public_key_fun}) - :ets.insert(@keystore_table, {:reward_seed_wrap_fun, reward_seed_wrap_fun}) - - :node_shared_secrets - |> TransactionChain.list_addresses_by_type() - |> Stream.take(-2) - |> Enum.each(&load_node_shared_secrets_tx/1) - - {:ok, state} - end - # we store functions in the ETS table, so we need to reload them # every upgrade to avoid: "xxx is invalid, likely because it points to an old version of the code" def code_change(_, state, _extra) do diff --git a/lib/archethic/mining/distributed_workflow.ex b/lib/archethic/mining/distributed_workflow.ex index 7dcf63dee..9a2cf479a 100644 --- a/lib/archethic/mining/distributed_workflow.ex +++ b/lib/archethic/mining/distributed_workflow.ex @@ -1036,11 +1036,6 @@ defmodule Archethic.Mining.DistributedWorkflow do {:keep_state_and_data, :postpone} end - def code_change(1, state, data, _extra) do - data = data |> Map.update!(:context, &Map.put(&1, :mining_error, nil)) - {:ok, state, data} - end - def code_change(_old_vsn, state, data, _extra), do: {:ok, state, data} defp notify_transaction_context( diff --git a/lib/archethic/shared_secrets/mem_tables/network_lookup.ex b/lib/archethic/shared_secrets/mem_tables/network_lookup.ex index 669aa18a3..31af7853b 100644 --- a/lib/archethic/shared_secrets/mem_tables/network_lookup.ex +++ b/lib/archethic/shared_secrets/mem_tables/network_lookup.ex @@ -116,10 +116,5 @@ defmodule Archethic.SharedSecrets.MemTables.NetworkLookup do public_key end - def code_change(1, state, _extra) do - :ets.delete(@table_name, :network_pool_address) - {:ok, state} - end - def code_change(_, state, _extra), do: {:ok, state} end diff --git a/mix.exs b/mix.exs index 5c9993b14..9c7676bf5 100644 --- a/mix.exs +++ b/mix.exs @@ -4,7 +4,7 @@ defmodule Archethic.MixProject do def project do [ app: :archethic, - version: "1.5.1", + version: "1.5.2", build_path: "_build", config_path: "config/config.exs", deps_path: "deps",