Skip to content

Commit

Permalink
chore(transfer): log close_records_stored in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Apr 2, 2024
1 parent 2c2d574 commit 3e6be4d
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions sn_transfers/src/wallet/data_payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,14 @@ impl PaymentQuote {
return false;
}

// // There could be pruning to be undertaken,
// // hence the `increasement` check only valid when not being too full.
// // As now using the `close_records_stored`, with the changing range,
// // there is chance that a newer close_records_stored will be smaller than old ones
// //
// // TODO: rethink about the detection policy on this part
//
// if new_quote.quoting_metrics.close_records_stored + 20
// < new_quote.quoting_metrics.max_records
// && new_quote.quoting_metrics.close_records_stored
// < old_quote.quoting_metrics.close_records_stored
// {
// info!("claimed records_stored out of sequence");
// return false;
// }
// There could be pruning to be undertaken, also the close range keeps changing as well.
// Hence `close_records_stored` could be growing or shrinking.
// Currently not to carry out check on it, just logging to observe the trend.
debug!(
"The new quote has {} close records stored, meanwhile old one has {}.",
new_quote.quoting_metrics.close_records_stored,
old_quote.quoting_metrics.close_records_stored
);

// TODO: Double check if this applies, as this will prevent a node restart with same ID
if new_quote.quoting_metrics.received_payment_count
Expand Down

0 comments on commit 3e6be4d

Please sign in to comment.