Open EmberCoin opened 6 years ago
On here I said "if your weight goes past ~850mil when it tries to stake it causes a runtime error and both force close" Correction if your input+reward goes past ~850mil when it tries to stake it causes a runtime error and both issues cause a force close.
if (txout.nValue > MAX_MONEY)
return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high"));
and MAX_MONEY is:
/** No amount larger than this (in satoshi) is valid */
static const int64_t MAX_MONEY = 850000000 * COIN; // 850 Million
There's already a check for negative, and it resides in an int64_t, so why is there a random value check when you already are using a well defined value...
Here is an interesting discussion which talks specifically about this variable: https://github.com/bitcoin/bitcoin/pull/6198/files
Credit to @ZbufferRing in Discord
Since this requires forking changes we will not be fixing this for quite a while.
please, fix, make changes to put ember to 1 satoshi again before coin swap (2018), and you will win millions.. :) and hold some!!
[5:19 AM] Kris BTC: @AndrewBC @everyone found a new bug I think, you cant have more then ~850mil in change it will cause a runtime error and if your weight goes past ~850mil when it tries to stake it causes a runtime error and both force close