Currently, the default behavior of the Lamports methods is to panic on overflow (due to overflow-checks flag).
Summary of changes
Return ProgramError::ArithmeticOverflow in the case of an overflow of Lamports trait methods instead of panicking, giving more flexibility to the developer to gracefully handle overflow situations.
Problem
Currently, the default behavior of the
Lamports
methods is to panic on overflow (due tooverflow-checks
flag).Summary of changes
Return
ProgramError::ArithmeticOverflow
in the case of an overflow ofLamports
trait methods instead of panicking, giving more flexibility to the developer to gracefully handle overflow situations.