diff --git a/payouts/unlocker.go b/payouts/unlocker.go index 3793edb..3e7e9e9 100644 --- a/payouts/unlocker.go +++ b/payouts/unlocker.go @@ -383,7 +383,7 @@ func handleUncle(height int64, uncle *rpc.GetBlockReply, candidate *storage.Bloc } else if cfg.Network == "ubiq" { reward = getUncleRewardUbiq(new(big.Int).SetInt64(uncleHeight), new(big.Int).SetInt64(height), getConstRewardUbiq(height)) } else if cfg.Network == "expanse" { - reward = getUncleRewardUbiq(new(big.Int).SetInt64(uncleHeight), new(big.Int).SetInt64(height), getConstRewardExpanse(height)) + reward = getUncleRewardExpanse(new(big.Int).SetInt64(uncleHeight), new(big.Int).SetInt64(height), getConstRewardExpanse(height)) } else if cfg.Network == "etica" { reward = getUncleRewardEthereum(new(big.Int).SetInt64(uncleHeight), new(big.Int).SetInt64(height), getConstRewardetica(height)) } else if cfg.Network == "callisto" { @@ -746,6 +746,17 @@ func getConstRewardExpanse(height int64) *big.Int { return new(big.Int).Set(homesteadExpanseReward) } +// expanse Uncle rw +func getUncleRewardExpanse(uHeight *big.Int, height *big.Int, reward *big.Int) *big.Int { + r := new(big.Int) + r.Add(uHeight, big8) + r.Sub(r, height) + r.Mul(r, reward) + r.Div(r, big8) + + return r +} + func getConstRewardEthereumpow(height int64) *big.Int { // Rewards) // EthereumPow