Skip to content

Commit

Permalink
fix: throw out SplitRecord error for the later on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi authored and joshuef committed Oct 26, 2023
1 parent 63c47cd commit 4dee4ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sn_networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:?}");

Expand Down

0 comments on commit 4dee4ef

Please sign in to comment.