creating Mining Rewards

DrSluiceDrSluice Member Posts: 26
edited December 2015 in Mining
I will be creating a mining reward for whoever mines the current block . I will be using the suggestion right from the Frontier tutorial on how to create tokens. If I simply cut and paste the text as follows from the tutorial:

You could for example reward ethereum miners, by creating a transaction that will reward who found the current block:


mapping (uint => address) miningReward;
function claimMiningReward() {
if (miningReward[block.number] == 0) {
coinBalanceOf[block.coinbase] += 1;
miningReward[block.number] = block.coinbase;
}
}

when I enter the code exactly as it appears above, naturally, I get error messages. Q: WHAT DO I NEED TO ADD, AND WHERE, TO UNLEASH THIS THING?
I would like my token reward to be = to 1 of my freshly registered tokens per block found.

Thank You. And Thank Vitalik and the DEV Team for broadening our horizons.
Post edited by DrSluice on

Comments

Sign In or Register to comment.