How to change the geth coinbase account reward

Posted By : Md Imroz Alam | 10-Apr-2017

In geth, If we do any transaction one account to another account then coinbase account get 5 ether as reward by default.

If we want to change reward for coinbase account, we make it by changing geth source code.

First, we have to get clone of go-ethereum and setup it. Reference for this https://github.com/ethereum/go-ethereum

After successful setup of ge-ethereum.

Step 1.

 a) Open Terminal
 b) go to following path:
     go-ethereum/core/fees.go
 

Step 2.

comment all the code of fess.go

//package core

//import (
  //  "math/big"
//)

//var BlockReward *big.Int = big.NewInt(5e+18)

Step 3.

add the following line of code in fees.go

package core

import (
"math/big"
)

func setBlockReward() big.Int {
  var reward big.Int = new(big.Int)
  reward.SetString("30000000000000000000", 10)
  return reward;
}

var BlockReward = setBlockReward()

Step 4.


Again back to go-ethereum folder by Terminal

run this following command



sudo make geth

if above command run successfully without error.

Now, we have changed daxxcoin reward as 15 ether.

Thanks

About Author

Author Image
Md Imroz Alam

Md. Imroz Alam is a bright Web App Developer, he has good knowledge of Java, J2SE, Jsp, Servlet, jdbc. His hobbies are watching movie, playing carom.

Request for Proposal

Name is required

Comment is required

Sending message..