Skip to content

Commit

Permalink
chore(client): no extra get retry when there is put retry
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Jun 14, 2024
1 parent 098ac56 commit 4cb570a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sn_client/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,9 @@ impl Client {
let cash_note_addr = SpendAddress::from_unique_pubkey(&unique_pubkey);
let network_address = NetworkAddress::from_spend_address(cash_note_addr);

trace!("Sending spend {unique_pubkey:?} to the network via put_record, with addr of {cash_note_addr:?}");
let key = network_address.to_record_key();
let pretty_key = PrettyPrintRecordKey::from(&key);
trace!("Sending spend {unique_pubkey:?} to the network via put_record, with addr of {cash_note_addr:?} - {pretty_key:?}");
let record_kind = RecordKind::Spend;
let record = Record {
key,
Expand All @@ -886,9 +887,10 @@ impl Client {
(None, Default::default())
};

// When there is retry on Put side, no need to have a retry on Get
let verification_cfg = GetRecordCfg {
get_quorum: Quorum::Majority,
retry_strategy: Some(RetryStrategy::Balanced),
retry_strategy: None,
target_record: record_to_verify,
expected_holders,
};
Expand Down

0 comments on commit 4cb570a

Please sign in to comment.