forked from Qortal/qortal
Now reward-shares with zero percent are valid, to allow the 'recipient' party to gain "number of minted blocks" but no actual block reward. Correspondly, the special zero share used to cancel reward-shares has been changed to be any negative value. Block rewards, founder 'leftovers': if founder is minter account in any online reward shares, then the per-founder-share is spread across their online reward-shares, otherwise it's simply/wholy given to that founder. Created a new DB table to hold "next block height", updated via triggers on Blocks. This is so various sub-queries can simply read the next-block-height value instead of complex IFNULL(MAX(height),0)+1 or SELECT height FROM Blocks ORDER BY height DESC. Prior code was also broken in edge cases, e.g. no genesis block, or ran slow. Added tests to cover above. Deleted BTC tests as they're obsolete. Added/improved other tests.