Skip to content

Commit

Permalink
Merge pull request #2007 from maqi/relax_on_parent_spend_verification
Browse files Browse the repository at this point in the history
chore(node): trust a parent spend with majority
  • Loading branch information
maqi authored Aug 1, 2024
2 parents 59d8528 + 71433c2 commit 4255e0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sn_networking/src/transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4255e0d

Please sign in to comment.