From 6c5925d66e6bdb5f01de05822e43fe7d350b3f50 Mon Sep 17 00:00:00 2001 From: Neylix Date: Wed, 13 Nov 2024 10:24:57 +0100 Subject: [PATCH 1/2] Fix dialyzer --- lib/archethic/mining/ledger_validation.ex | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/archethic/mining/ledger_validation.ex b/lib/archethic/mining/ledger_validation.ex index ee7052d52..c257dbb53 100644 --- a/lib/archethic/mining/ledger_validation.ex +++ b/lib/archethic/mining/ledger_validation.ex @@ -581,6 +581,4 @@ defmodule Archethic.Mining.LedgerValidation do defp next_state(ops = %__MODULE__{state: :inputs_consumed}), do: %__MODULE__{ops | state: :movements_resolved} - - defp next_state(ops = %__MODULE__{state: :movements_resolved}), do: ops end From 33f6825f28d653082ecb65b415e2563a43e45f61 Mon Sep 17 00:00:00 2001 From: Neylix Date: Thu, 14 Nov 2024 15:33:47 +0100 Subject: [PATCH 2/2] Filter 0 address in rebuild utxo task --- lib/mix/tasks/db.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/mix/tasks/db.ex b/lib/mix/tasks/db.ex index 17360f364..c66a3a869 100644 --- a/lib/mix/tasks/db.ex +++ b/lib/mix/tasks/db.ex @@ -179,6 +179,8 @@ defmodule Mix.Tasks.Archethic.Db do defp list_chain_addresses(genesis_address) do ChainIndex.list_chain_addresses(genesis_address, DB.filepath()) + # Remove 0 address as it does not exists + |> Stream.reject(fn {address, _} -> :binary.decode_unsigned(address) == 0 end) |> Stream.map(fn {address, timestamp} -> {address, timestamp, genesis_address} end) |> Enum.to_list() end