You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
) the following line can sometimes lead to an incorrect fee as it does a Math.ceil on the value.
This means that if JS's Math engine, for example, gave a result of something like 620.00000001 in the preceding math, the Math.ceil() would round this up to 621, causing an off-by-one error.
Math.round() will probably resolve this as, even with JS Math's inconsistencies, it should always round back to the correct target integer.
The text was updated successfully, but these errors were encountered:
[In ](
cashscript/packages/cashscript/src/Transaction.ts
Line 325 in 123e45a
Math.ceil
on the value.This means that if JS's Math engine, for example, gave a result of something like 620.00000001 in the preceding math, the
Math.ceil()
would round this up to 621, causing an off-by-one error.Math.round()
will probably resolve this as, even with JS Math's inconsistencies, it should always round back to the correct target integer.The text was updated successfully, but these errors were encountered: