From 71433c2a13b2a1799cb36d30a276792ff0949e79 Mon Sep 17 00:00:00 2001 From: qima Date: Thu, 25 Jul 2024 23:50:00 +0800 Subject: [PATCH] chore(node): trust a parent spend with majority --- sn_networking/src/transfers.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sn_networking/src/transfers.rs b/sn_networking/src/transfers.rs index 8f240c156b..be8e9dd12b 100644 --- a/sn_networking/src/transfers.rs +++ b/sn_networking/src/transfers.rs @@ -66,10 +66,11 @@ impl Network { expected, got, })) => { - // if majority holds the spend, it might be worth it to try again. + // if majority holds the spend, it might be worth to be trusted. if got >= close_group_majority() { - debug!("At least a majority nodes hold the spend {address:?}, so trying to get it again."); - get_cfg.retry_strategy = Some(RetryStrategy::Persistent); + debug!("At least a majority nodes hold the spend {address:?}, going to trust it if can fetch with majority again."); + get_cfg.get_quorum = Quorum::Majority; + get_cfg.retry_strategy = Some(RetryStrategy::Balanced); self.get_record_from_network(key, &get_cfg).await? } else { return Err(NetworkError::GetRecordError(