Skip to main content

upgrade_batch

Function upgrade_batch 

Source
pub fn upgrade_batch<T: BlockMetadata>(
    batch: TransferBatch<T>,
) -> ResolvedBatch<T>
Expand description

Upgrade a batch of queued blocks by resolving weak references.

This is the “block upgrader” stage that converts TransferBatch (containing mixed SourceBlock types) into ResolvedBatch (containing only resolved ImmutableBlock guards).

§Block Type Handling

  • Strong: Already have a guard, pass through directly
  • External: No guard needed, caller holds the reference
  • Weak: Attempt upgrade; if evicted, record in evicted list

This function is synchronous CPU work that can run in an “on-deck” slot while other transfers are executing.