Skip to content

Commit 707a949

Browse files
Changes miningReward method to calculate the reward for block zero correctly
1 parent fcd83f4 commit 707a949

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ethereum/client.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,14 +1067,10 @@ func (ec *Client) populateTransaction(
10671067
// for a given block height.
10681068
//
10691069
// Source:
1070-
// https://github.com/ethereum/go-ethereum/master/consensus/ethash/consensus.go#L619-L645
1070+
// https://github.com/ethereum/go-ethereum/blob/master/consensus/ethash/consensus.go#L646-L653
10711071
func (ec *Client) miningReward(
10721072
currentBlock *big.Int,
10731073
) int64 {
1074-
if currentBlock.Int64() == int64(0) {
1075-
return big.NewInt(0).Int64()
1076-
}
1077-
10781074
blockReward := ethash.FrontierBlockReward.Int64()
10791075
if ec.p.IsByzantium(currentBlock) {
10801076
blockReward = ethash.ByzantiumBlockReward.Int64()

0 commit comments

Comments
 (0)