Skip to content

Commit 243bb5f

Browse files
committed
fix: 🩹 amend review
1 parent c59803e commit 243bb5f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

client/indexer-db/migrations/.diesel_lock

Whitespace-only changes.

client/indexer-service/src/handler.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ impl<Runtime: StorageEnableRuntime> IndexerService<Runtime> {
387387

388388
// Check if this file key is already present in the bucket of the MSP
389389
// In this scenario, this will always return false, since there's no other file record
390-
// in the DB, but it's still a good practice to check it.
390+
// in the DB, but it's still good practice to check it.
391391
let is_in_bucket =
392392
File::is_file_key_in_bucket(conn, file_key.as_ref().to_vec())
393393
.await?;
@@ -454,8 +454,10 @@ impl<Runtime: StorageEnableRuntime> IndexerService<Runtime> {
454454
let tx_hash_bytes = evm_tx_hash.map(|h| h.as_bytes().to_vec());
455455

456456
// Check if this file key is already present in the bucket of the MSP
457-
// This is because the `MutationsApplied` event won't be emitted for this file key when
458-
// the MSP accepts it because the MSP is already storing it.
457+
// This could happen if there was a previous storage request for this file key that
458+
// the MSP accepted, and the new storage request was issued by the user to add redundancy to it.
459+
// We do this check because in this scenario,the `MutationsApplied` event won't be emitted for this
460+
// file key when the MSP accepts it, as the MSP is already storing it.
459461
let is_in_bucket =
460462
File::is_file_key_in_bucket(conn, file_key.as_ref().to_vec()).await?;
461463

@@ -563,8 +565,8 @@ impl<Runtime: StorageEnableRuntime> IndexerService<Runtime> {
563565
let tx_hash_bytes = evm_tx_hash.map(|h| h.as_bytes().to_vec());
564566

565567
// Check if this file key is already present in the bucket of the MSP
566-
// This is because the `MutationsApplied` event won't be emitted for this file key because
567-
// the MSP was already storing it.
568+
// In this scenario, this will always return false, since there's no other file record
569+
// in the DB, but it's still a good practice to check it.
568570
let is_in_bucket =
569571
File::is_file_key_in_bucket(conn, file_key.as_ref().to_vec()).await?;
570572

0 commit comments

Comments
 (0)