Skip to content

Commit

Permalink
Remove divisions (#187)
Browse files Browse the repository at this point in the history
After discussing we realized these divisions are not needed
  • Loading branch information
br4e authored Apr 24, 2024
1 parent 3d2fe44 commit 8f2cc61
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions x/emissions/keeper/inference_synthesis/network_losses.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ func CalcNetworkLosses(
if err != nil {
return emissions.ValueBundle{}, err
}
oneE18, err := AlloraOneE18()
if err != nil {
return emissions.ValueBundle{}, err
}
stakeAmount, err = stakeAmount.Quo(oneE18)
if err != nil {
return emissions.ValueBundle{}, err
}

// Update combined loss with reputer reported loss and stake
nextCombinedLoss, err := RunningWeightedAvgUpdate(&runningWeightedCombinedLoss, stakeAmount, report.ValueBundle.CombinedValue, epsilon)
Expand Down Expand Up @@ -282,17 +274,7 @@ func CalcCombinedNetworkLoss(
fmt.Println("Error converting stake to Dec: ", err)
return Loss{}, err
}
if err != nil {
return Loss{}, err
}
oneE18, err := AlloraOneE18()
if err != nil {
return Loss{}, err
}
stakeAmount, err = stakeAmount.Quo(oneE18)
if err != nil {
return Loss{}, err
}

// Update combined loss with reputer reported loss and stake
nextCombinedLoss, err := RunningWeightedAvgUpdate(
&runningWeightedCombinedLoss,
Expand Down

0 comments on commit 8f2cc61

Please sign in to comment.