Post
Topic
Board Altcoin Discussion
Re: need help !!
by
paraboul
on 27/09/2017, 11:29:14 UTC
I guess you're refering to GetBlockSubsidy() function.

nSubsidy is the number of coin "mined".
nHeight is the block number.

Here you're just telling the function to reward "10000" coins for the first block (provided that you're returning this value).

Given what you asked, a more comprehensible way to achieve the same result would be :

Code:
  nSubsidy = (nHeight == 1) ?
                      10000 * COIN :
                      100 * COIN;

Also, not sure, but the first block is probably 0 (nHeight)

i want 10000coins  in the first block and he rest blocks should have 100 coins each  considering the simple liteocin source i guess mine is right but still need some expert advice


Since you only want 100000 coins total, you need to stop rewarding coin after 1000 blocks minus the first premined. So 900 blocks. (900*100 + 10000 = 100000).

Just add at the beginning :

Code:
if (nHeight > 900) return 0;

Not sure what your problem is? This is very simple