Skip to content

Commit

Permalink
Merge-to-master orphaned conflicts instead of invalidating the block
Browse files Browse the repository at this point in the history
  • Loading branch information
karimodm committed Oct 4, 2023
1 parent ca796ce commit 5047a90
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pkg/protocol/engine/booker/inmemorybooker/booker.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,9 @@ func (b *Booker) book(block *blocks.Block) error {
return ierrors.Errorf("failed to load transaction %s for block %s", conflictID.String(), block.ID())
}

if orphanedSlot, orphaned := txMetadata.IsOrphaned(); orphaned {
if orphanedSlot <= block.SlotCommitmentID().Slot() {
block.SetInvalid()

return nil
}
if orphanedSlot, orphaned := txMetadata.IsOrphaned(); orphaned && orphanedSlot <= block.SlotCommitmentID().Slot() {
// Merge-to-master orphaned conflicts.
conflictsToInherit.Delete(conflictID)
}
}

Expand Down

0 comments on commit 5047a90

Please sign in to comment.