diff --git a/cmd/microservice-solana-worker-server/main.go b/cmd/microservice-solana-worker-server/main.go index 6725b47d1..8d0e9f9cd 100644 --- a/cmd/microservice-solana-worker-server/main.go +++ b/cmd/microservice-solana-worker-server/main.go @@ -137,8 +137,18 @@ func main() { sizeOfThePool := new(big.Rat).SetUint64(unscaledPool) + log.Debug(func(k *log.Log) { + k.Message = "Unscaled reward pool size" + k.Payload = unscaledPool + }) + sizeOfThePool.Quo(sizeOfThePool, decimalPlacesRat) + log.Debug(func(k *log.Log) { + k.Message = "Scaled reward pool size" + k.Payload = sizeOfThePool.String() + }) + for _, userAction := range userActions { var ( userActionTransactionHash = userAction.Transaction.Signature @@ -200,6 +210,8 @@ func main() { }, } + emission.Payout.RewardPool, _ = sizeOfThePool.Float64() + randomN, randomPayouts, _ := probability.WinningChances( worker_types.TrfModeNormal, solanaTransactionFeesNormalised, diff --git a/common/calculation/probability/probability.go b/common/calculation/probability/probability.go index 5e7fc0be5..f39fa2577 100644 --- a/common/calculation/probability/probability.go +++ b/common/calculation/probability/probability.go @@ -129,8 +129,6 @@ func payout(trfMode worker.TrfMode, atx, g, blockTimeRat, delta *big.Rat, winnin emission.Payout.B = b emission.Payout.Delta, _ = delta.Float64() emission.Payout.Atx, _ = atx.Float64() - //emission.Payout.BlockTime = blockTime - //emission.Payout.RewardPool, _ = rewardPool.Float64() return aDivP, p }