pub fn find_lock_difference(
all_locks: Vec<TokenLock>,
locks_to_be_unlocked: Vec<TokenLock>,
) -> (Vec<TokenLock>, Vec<TokenLock>)Expand description
Find the difference between two lock vectors. This must take into account that same looking lock can coexist, for example, there can be 2 locks for unlocking 100 tokens at block 100 both. In this case, the difference calculation must only remove one occurances of the lock if one is present in the locks_to_be_unlocked vector. Locks are by default stored by unlock time in ascending order by design, but we can sort it once more to be sure. Return both locks to keep and valid locks to be unlocked since the locks_to_be_unlocked vector can actually contain invalid locks.