Skip to content

Commit

Permalink
Up version 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Neylix committed May 13, 2024
1 parent 9ea8920 commit 7f15c94
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 28 deletions.
17 changes: 0 additions & 17 deletions lib/archethic/crypto/keystore/shared_secrets/software_impl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions lib/archethic/mining/distributed_workflow.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 0 additions & 5 deletions lib/archethic/shared_secrets/mem_tables/network_lookup.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7f15c94

Please sign in to comment.