debug Distributor

This commit is contained in:
Alain Zscheile 2022-11-27 17:15:45 +01:00
parent 5206a83324
commit faec74dc0c

View file

@ -87,12 +87,14 @@ defmodule Floof.Distributor do
end end
) )
for trg <- trgs do if dcd != nil do
send(trg, {:fwdxfer, {dcdhash, dcd}}) for trg <- trgs do
end send(trg, {:fwdxfer, {dcdhash, dcd}})
end
if ttl > 1 do if ttl > 1 do
Floof.SessionManager.set_for_all(dcdhash, dcd, origin) Floof.SessionManager.set_for_all(dcdhash, dcd, origin)
end
end end
end) end)
end end
@ -114,6 +116,7 @@ defmodule Floof.Distributor do
cond do cond do
Floof.DistributorSeen.have_we(dcdhash) -> Floof.DistributorSeen.have_we(dcdhash) ->
# we can ignore this packet, its content was already processed # we can ignore this packet, its content was already processed
Logger.debug("packet discarded, already seen #{Base.url_encode64(dcdhash)}")
false false
not :enacl.sign_verify_detached(sigval, xfinner, pubkey) -> not :enacl.sign_verify_detached(sigval, xfinner, pubkey) ->