This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Use weight constants::
in the weight template
#11215
Labels
J0-enhancement
An additional feature request.
U3-nice_to_have
Issue is worth doing eventually.
Z1-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder
Z6-mentor
An easy task where a mentor is available. Please indicate in the issue who the mentor could be.
The weight template currently outputs something like
(x as Weight)
which is semantically not very clear.Changing this to
(x * constants::WEIGHT_PER_NANOS)
with the correct units would be much better.One possible approach:
38_000_000
becomes38_000 * WEIGHT_PER_NANOS
WEIGHT_PER_NANOS
is probably the only one that we can use, as it would otherwise use float point multiplication.The text was updated successfully, but these errors were encountered: