Skip to content

Commit

Permalink
feat: immediate stop on RecordNotFound
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi authored and joshuef committed Oct 3, 2023
1 parent d8343c9 commit 56fb9e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sn_networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@ impl Network {
}
}
}
Err(Error::RecordNotFound) => {
// libp2p RecordNotFound does mean no holders answered.
// In that case, a retry will be somehow pointless,
// hence return with error immediately.
warn!(
"No holder of record '{:?}' from network!. Terminating the fetch ...",
PrettyPrintRecordKey::from(key.clone()),
);
break;
}
Err(error) => {
error!("{error:?}");
if verification_attempts >= total_attempts {
Expand Down

0 comments on commit 56fb9e7

Please sign in to comment.