From 4dee4ef0b295187318dec1611620af1e2972a660 Mon Sep 17 00:00:00 2001 From: qima Date: Thu, 26 Oct 2023 20:52:17 +0800 Subject: [PATCH] fix: throw out SplitRecord error for the later on merge --- sn_networking/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sn_networking/src/lib.rs b/sn_networking/src/lib.rs index aa740e77e1..143bebdc78 100644 --- a/sn_networking/src/lib.rs +++ b/sn_networking/src/lib.rs @@ -369,6 +369,14 @@ impl Network { warn!("No holder of record '{pretty_key:?}' found. Retrying the fetch ...",); } + Err(Error::SplitRecord { result_map }) => { + error!("Getting record {pretty_key:?} attempts #{verification_attempts}/{total_attempts} , encountered split"); + + if verification_attempts >= total_attempts { + return Err(Error::SplitRecord { result_map }); + } + warn!("Fetched split Record '{pretty_key:?}' from network!. Retrying...",); + } Err(error) => { error!("Getting record {pretty_key:?} attempts #{verification_attempts}/{total_attempts} , encountered {error:?}");