Skip to content

Commit

Permalink
fixup: don't delete unwrapped then deleted objects
Browse files Browse the repository at this point in the history
  • Loading branch information
amnn committed Oct 28, 2024
1 parent e59b85e commit d2b7457
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/sui-indexer-alt/src/handlers/sum_obj_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ impl Processor for SumObjTypes {
// Iterate over transactions in reverse so we see the latest version of each object first.
for tx in transactions.iter().rev() {
// Deleted and wrapped objects -- objects that show up without a digest in
// `object_changes` are either deleted or wrapped.
// `object_changes` are either deleted or wrapped. Objects without an input version
// must have been unwrapped and deleted, meaning they do not need to be deleted from
// our records.
for change in tx.effects.object_changes() {
if change.output_digest.is_some() {
if change.output_digest.is_some() || change.input_version.is_none() {
continue;
}

Expand Down

0 comments on commit d2b7457

Please sign in to comment.