How to split up the coinbase reward? [ALTCOIN]
How to split up the coinbase reward? [ALTCOIN] This should be an intriguing question/problem for anyone involved with bitcoin development or altcoin development. Some Context... I'm currently in development of an altcoin based on the bitcoin source code, which is designed to help charities raise capital. It does this by sending 20% of the coinbase reward to a pre-defined wallet address, whenever a successful block is mined by a miner. Lets call this wallet the fund wallet. This 20% is used to fund the charity. As the coin is adopted and mined, this wallet receives a steady stream of coins. The Part That Works... I have made some changes to the original bitcoin code so that the mining reward can be split over multiple wallets when the coin is mined in the QT wallet. In src/miner.cpp the coinbase transaction is an object of type CMutableTransaction, which has a vector of outputs called vout. Now, when a miner mines a block, the coinbase transaction's output is split into two ...