Skip to content

Commit

Permalink
Filter 0 address in rebuild utxo task
Browse files Browse the repository at this point in the history
  • Loading branch information
Neylix committed Nov 14, 2024
1 parent 6c5925d commit 33f6825
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mix/tasks/db.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33f6825

Please sign in to comment.