Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Improve seed reveal check #8625

Merged
merged 2 commits into from
Jun 21, 2023
Merged

Conversation

bobanm
Copy link
Contributor

@bobanm bobanm commented Jun 18, 2023

What was the problem?

This PR resolves #8578

How was it solved?

  • Added previousSeedRequired argument to isSeedValidInput() function, which when set to false completely handles what getSeedRevealValidity() function used to do
  • Removed redundant getSeedRevealValidity() function
  • Replaced all usage of getSeedRevealValidity() in Random module with isSeedValidInput()

How was it tested?

Added 5 new test cases, which test all [?] possible scenarios when using isSeedValidInput(), including the scenarios previously covered by the removed getSeedRevealValidity() function.

@bobanm bobanm requested review from shuse2 and mosmartin June 18, 2023 11:22
@bobanm bobanm self-assigned this Jun 18, 2023
@codecov
Copy link

codecov bot commented Jun 18, 2023

Codecov Report

Merging #8625 (06f0aad) into development (fbb7c2b) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 06f0aad differs from pull request most recent head 3b370dd. Consider uploading reports for the commit 3b370dd to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #8625      +/-   ##
===============================================
- Coverage        83.34%   83.33%   -0.01%     
===============================================
  Files              593      593              
  Lines            22245    22238       -7     
  Branches          3278     3275       -3     
===============================================
- Hits             18540    18532       -8     
- Misses            3705     3706       +1     
Impacted Files Coverage Δ
framework/src/modules/random/endpoint.ts 95.18% <100.00%> (ø)
framework/src/modules/random/method.ts 100.00% <100.00%> (ø)
framework/src/modules/random/utils.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@shuse2 shuse2 enabled auto-merge (squash) June 21, 2023 11:05
@shuse2 shuse2 merged commit 87befde into development Jun 21, 2023
@shuse2 shuse2 deleted the 8578-improve-seed-reveal-check branch June 21, 2023 11:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve performance of Random module getSeedRevealValidity() function
3 participants