referrerpolicy=no-referrer-when-downgrade

Function pallet_vesting::pallet::dispatchables::merge_schedules

source ·
pub fn merge_schedules<T: Config>(schedule1_index: u32, schedule2_index: u32)
Expand description

Merge two vesting schedules together, creating a new vesting schedule that unlocks over the highest possible start and end blocks. If both schedules have already started the current block will be used as the schedule start; with the caveat that if one schedule is finished by the current block, the other will be treated as the new merged schedule, unmodified.

NOTE: If schedule1_index == schedule2_index this is a no-op. NOTE: This will unlock all schedules through the current block prior to merging. NOTE: If both schedules have ended by the current block, no new schedule will be created and both will be removed.

Merged schedule attributes:

  • starting_block: MAX(schedule1.starting_block, scheduled2.starting_block, current_block).
  • ending_block: MAX(schedule1.ending_block, schedule2.ending_block).
  • locked: schedule1.locked_at(current_block) + schedule2.locked_at(current_block).

The dispatch origin for this call must be Signed.

  • schedule1_index: index of the first schedule to merge.
  • schedule2_index: index of the second schedule to merge.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::merge_schedules.