Skip to content

Commit

Permalink
Rmoving unneeded call to maybe_add_burning_address
Browse files Browse the repository at this point in the history
  • Loading branch information
netboz committed Dec 15, 2022
1 parent 656a33c commit 6942b01
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/archethic/mining/distributed_workflow.ex
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ defmodule Archethic.Mining.DistributedWorkflow do
else
resolved_addresses
|> Enum.map(fn {_origin, resolved} -> resolved end)
|> maybe_add_burning_address(
LedgerOperations.burning_address(),
tx.validation_stamp.ledger_operations.transaction_movements
)
|> Election.io_storage_nodes(authorized_nodes)
end

Expand Down Expand Up @@ -1027,14 +1023,4 @@ defmodule Archethic.Mining.DistributedWorkflow do

P2P.broadcast_message(storage_nodes, message)
end

defp maybe_add_burning_address(resolved_addresses, burning_address, tx_mvts) do
case Enum.any?(tx_mvts, fn tx_mvt -> tx_mvt.to == burning_address end) do
true ->
Enum.concat(resolved_addresses, [burning_address])

_ ->
resolved_addresses
end
end
end

0 comments on commit 6942b01

Please sign in to comment.