From c7d66e2ff2cb9b25cba94491553794bfccef7923 Mon Sep 17 00:00:00 2001 From: bchamagne Date: Tue, 8 Oct 2024 17:24:44 +0200 Subject: [PATCH] fix acceptance resolver when resyncing --- lib/archethic/self_repair/network_chain.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/archethic/self_repair/network_chain.ex b/lib/archethic/self_repair/network_chain.ex index fb41f9c1e..c10b78b50 100644 --- a/lib/archethic/self_repair/network_chain.ex +++ b/lib/archethic/self_repair/network_chain.ex @@ -165,7 +165,8 @@ defmodule Archethic.SelfRepair.NetworkChain do case TransactionChain.fetch_last_address(genesis_address, nodes, consistency_level: 8, - acceptance_resolver: &(&1.timestamp > local_last_address_timestamp) + acceptance_resolver: + &(DateTime.compare(&1.timestamp, local_last_address_timestamp) == :gt) ) do {:ok, remote_last_address} -> {:error, {genesis_address, remote_last_address}}