Skip to content

Commit

Permalink
Update for Constantinople hard fork
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy007 authored and salanki committed Jan 12, 2019
1 parent ab54eac commit 3caab4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions payouts/unlocker.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ type UnlockerConfig struct {

const minDepth = 16
const byzantiumHardForkHeight = 4370000
const constantinopleHardForkHeight = 7080000

var homesteadReward = math.MustParseBig256("5000000000000000000")
var byzantiumReward = math.MustParseBig256("3000000000000000000")
var constantinopleReward = math.MustParseBig256("2000000000000000000")

// Donate 10% from pool fees to developers
const donationFee = 10.0
Expand Down Expand Up @@ -502,6 +504,9 @@ func weiToShannonInt64(wei *big.Rat) int64 {
}

func getConstReward(height int64) *big.Int {
if height >= constantinopleHardForkHeight {
return new(big.Int).Set(constantinopleReward)
}
if height >= byzantiumHardForkHeight {
return new(big.Int).Set(byzantiumReward)
}
Expand Down

0 comments on commit 3caab4a

Please sign in to comment.