Skip to content

Commit c73ba45

Browse files
added comments
1 parent b1bbe6e commit c73ba45

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

chains/atomic/shared_memory.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ func (s *state) RemoveValue(key []byte) error {
276276
return s.valueDB.Put(key, valueBytes)
277277
}
278278

279+
// Don't allow the removal of something that was already removed.
279280
if !value.Present {
280281
return errDuplicatedOperation
281282
}

snow/engine/snowman/transitive.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,9 @@ func (t *Transitive) issueFrom(vdr ids.ShortID, blk snowman.Block) (bool, error)
480480

481481
issued := t.Consensus.Issued(blk)
482482
if issued {
483+
// A dependency should never be waiting on an issued block. However, if
484+
// the block was marked as rejected by the VM, the dependencies may
485+
// still be waiting. Therefore, they should abandoned.
483486
t.blocked.Abandon(blkID)
484487
}
485488

0 commit comments

Comments
 (0)