Skip to content

Commit

Permalink
chore(node): trust a parent spend with majority
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Jul 29, 2024
1 parent 1146530 commit 71433c2
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 71433c2

Please sign in to comment.