GlobalVersions.md states that GETORIGINALFWDFEE returns fwd_fee * 2^16 / first_frac, but the actual opcode in crypto/vm/tonops.cpp computes fwd_fee * 2^16 / (2^16 - first_frac)
Please update the changelog so the documented formula matches the real calculation.
|
* `GETORIGINALFWDFEE` (`fwd_fee is_mc - orig_fwd_fee`) - calculate `fwd_fee * 2^16 / first_frac`. Can be used to get the original `fwd_fee` of the message. |
|
stack.push_int(td::muldiv(fwd_fee, td::make_refint(1 << 16), td::make_refint((1 << 16) - prices.first_frac))); |
GlobalVersions.mdstates thatGETORIGINALFWDFEEreturnsfwd_fee * 2^16 / first_frac, but the actual opcode incrypto/vm/tonops.cppcomputesfwd_fee * 2^16 / (2^16 - first_frac)Please update the changelog so the documented formula matches the real calculation.
ton/doc/GlobalVersions.md
Line 85 in 5c03491
ton/crypto/vm/tonops.cpp
Line 360 in 5c03491