Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong totalDifficultyFaced value in players' data which causes wrong score #19

Open
clauBv23 opened this issue Apr 21, 2024 · 0 comments

Comments

@clauBv23
Copy link

clauBv23 commented Apr 21, 2024

The totalDifficultFaced value is being incremented twice resulting in an invalid value that breaks the score formula.
check this player that has only submitted lvl 30 with 8 difficulty and has totalDifficultyFaced 16

{
  "player": "0xD3Cb539Dbe80cFaEdfE6411727ff2D3d9953Ee36",
  "averageTimeTakenToCompleteALevel": 0,
  "totalNumberOfLevelsCompleted": 1,
  "totalDifficultyFaced": 16,
  "alias": ""
}

ps: there are a couple of other players with totalDifficultyFaced values really high due to this issue.
Ex :

{
    "player": "0xAa73C7422F0B0478fb9C5648d732ab33C5a4B330",
    "averageTimeTakenToCompleteALevel": 11007,
    "totalNumberOfLevelsCompleted": 30,
    "totalDifficultyFaced": 288,
    "alias": "",
    "score": 93.47516615300752
  }

I think this issue is due to the call to crawlForFreshEntriesAndUpdateNetworkBoard function in the file root causing this the function being called twice: first when the file is imported, and again when it is called in the trigger function

opened #20 to illustrate the issue, I might be wrong, just take a quick look at the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant