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 · 3 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,    // max value should be  ~157
    "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

@NithinJ-17
Copy link

NithinJ-17 commented Jul 23, 2024

As Im new to open source contribution , would like to know how things work, so @clauBv23 Can i take up this issue to resolve?

@clauBv23
Copy link
Author

Hi @NithinJ-17, welcome to the open-source community! I'm glad to have you here.

Thanks for your interest in this issue. I’ve already proposed a solution in PR #20, but please feel free to take a look at it. I didn’t put a lot of effort into it, so there might be a better way to solve it.

Just a heads up, I’m not an official member of this repository; I just highlighted this issue.
Maybe @GianfrancoBazzani can provide you with better guidance.

@NithinJ-17
Copy link

Thanks @clauBv23 for your response. I will take a better look at it abd thanks for the tip

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

2 participants