Expand description

trait for abstracting underlying storage of pubkey and account pairs to be written

Structs

  • holds slices of accounts being moved FROM a common source slot to ‘target_slot’
  • accounts that are moving from ‘old_slot’ to ‘target_slot’ since all accounts are from the same old slot, we don’t need to create a slice with per-account slot but, we need slot(_) to return ‘old_slot’ for all accounts Created a struct instead of a tuple to make the code easier to read.

Traits

  • abstract access to pubkey, account, slot, target_slot of either: a. (slot, &[&Pubkey, &ReadableAccount]) b. (slot, &[&Pubkey, &ReadableAccount, Slot]) (we will use this later) This trait avoids having to allocate redundant data when there is a duplicated slot parameter. All legacy callers do not have a unique slot per account to store.