-
Notifications
You must be signed in to change notification settings - Fork 22
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
moved from weighted mean to weighted median #710
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
0xcuriousapple
approved these changes
Feb 22, 2022
accWeight = accWeight + weight; // denominator: total influence revealed for this collection | ||
accWeight = accWeight + weight; // total influence revealed for this collection | ||
if (disputes[epoch][msg.sender].median == 0 && accWeight > medianWeight) { | ||
disputes[epoch][msg.sender].median = sortedValues[i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break here
not possible due to acc weight
hrishikeshio
approved these changes
Feb 23, 2022
SkandaBhat
added a commit
that referenced
this pull request
Mar 15, 2022
* Increased Coverage on CollectionManager (#715) * moved from weighted mean to weighted median (#710) * Natspec added to parameters and random manager (#712) * natspec changes to randomManager * natspec added to parameters * linting fixes * natspec fixes * natspec added to internal functions * lint fixes * spelling fix * test: increased test coverage (#725) * test: increased Coverage on StakeManager and MerklePos (#730) * docs: natspec added to delegator, block manager and vote manager (#729) * docs: natspec added to delegator, block manager and vote manager * docs: natspec fix * docs: natspec added to events * docs: natspec fix * docs: lint fix * docs: natspec added to staked token contracts (#734) * feat: add docgen to the project from natspec (#731) * feat: add docgen to the project from natspec * fix: fix package.json versions * fix: fix tests * chore: fix locks Co-authored-by: SkandaBhat <bhat.skanda.m@gmaill.com> * fix: removed require statement from BlockManager (#740) * test: increased coverage on BlockManager and RandomNoManager (#733) * test: increased coverage on BlockManager and RandomNoManager * test: increased coverage on BlockManager added test case * test: increased coverage on blockManager * feat: merged from master * fix: fixed gascompare error * fix: clean up docgen (#743) Co-authored-by: SkandaBhat <bhat.skanda.m@gmaill.com> * fix: only propose revealed assets of epoch (#726) * fix: only propose revealed assets of epoch * chore: lint * fix: medianIndex renamed to activeCollectionIndex * chore: slither and lint * chore: silly slither * fix: scenarios failing * fix: disputes optimised and one bug with penalties fixed * docs: added natspec comments * chore: cleanup * fix: reveal event updated for node needs * fix: scenarios test failing * fix: activeCollectionIndex renamed to leafId * fix: optmized for calls in loop : slither warning (#745) Co-authored-by: Gaurav Jain <65170724+GauravJain9@users.noreply.github.com> Co-authored-by: SamAg19 <52957842+SamAg19@users.noreply.github.com> Co-authored-by: SkandaBhat <bhat.skanda.m@gmaill.com> Co-authored-by: Abhishek Vispute <abhivispute33@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #709
fixes #666