Post
Topic
Board Development & Technical Discussion
Re: How max money works?
by
HeRetiK
on 26/07/2018, 11:30:09 UTC
But above MAX_MONEY value's sanity check, how it work?

For instance by declining any transaction including an amount larger than MAX_MONEY

Code:
if (txout.nValue > MAX_MONEY)
      return state.DoS(100, false, REJECT_INVALID, "bad-txns-vout-toolarge");
https://github.com/bitcoin/bitcoin/blob/3c098a8aa0780009c11b66b1a5d488a928629ebf/src/consensus/tx_verify.cpp#L176

Follow bob123's advice from above and do a simple text search on Bitcoin's repo.


And what happen pre-mine 100% of coin and still mining reward is not 0?

...then you probably didn't set the mining reward / block subsidy to 0?