Skip to main content

with_guard_margin

Function with_guard_margin 

Source
pub fn with_guard_margin(tokens: u64) -> u64
Expand description

Apply the runtime’s 5/4 context-guard safety margin to a raw token estimate. Rounds up (div_ceil), never down — the margin only ever pushes the boundary check to be more cautious.