Function: terminate()
This function is used to terminate the allocation and transfer the remaining tokens to the authority.
Branches and code coverage
Intended branches
Accumulate
milestoneAwards
and calculate the total amount of tokens to recover.Set the terminated time and short stop duration.
Transfer the remaining tokens to the authority.
Set the allocation as terminated.
Negative behavior
Revert if the caller is not the controller.
Revert if the allocation is already terminated.
Revert if this function is reentered.