Skip to content

Commit

Permalink
Update lib/archethic/p2p/node.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Neylix <[email protected]>
  • Loading branch information
samuelmanzanera and Neylix authored Sep 6, 2024
1 parent 0c26dec commit d2eaea6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/archethic/p2p/node.ex
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,9 @@ defmodule Archethic.P2P.Node do
avg_bin = trunc(average_availability * 100)

mining_public_key_bin =
case mining_public_key do
nil -> ""
_ -> mining_public_key
end
if is_nil(mining_public_key),
do: <<0::8>>,
else: <<1::8, mining_public_key::binary>>

<<ip_bin::binary-size(4), port::16, http_port::16, serialize_transport(transport)::8,
geo_patch::binary-size(3), network_patch::binary-size(3), avg_bin::8,
Expand Down

0 comments on commit d2eaea6

Please sign in to comment.