livepeer / protocol

Livepeer protocol
MIT License
152 stars 45 forks source link

bondingManager: make DLL in place representation of active set #318

Closed kyriediculous closed 5 years ago

kyriediculous commented 5 years ago

What does this pull request do? Explain your changes. (required)

Specific updates (required)

How did you test each of these updates (required) Adjusted & ran unit and integation tests

Does this pull request close any open issues? Fixes #300 Fixes #302 Fixes #304

Checklist:

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 812


Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/bonding/BondingManager.sol 69 70 98.57%
<!-- Total: 74 75 98.67% -->
Totals Coverage Status
Change from base Build 783: -0.09%
Covered Lines: 749
Relevant Lines: 751

đź’› - Coveralls
kyriediculous commented 5 years ago

Added a commit that includes the requested changes as well as a new flag on the Transcoder struct, activationRound.

We can't do an active transcoder check on Transcoder.lastActiveStakeUpdateRound >0 && <= currentRound, because eg. when a delegate bonds to an already registered transcoder then the transcoder's lastActiveStakeUpdateRound will be set to currentRound + 1, resulting in isActiveTranscoder returning false when it should be true for the remainder of the round.

yondonfu commented 5 years ago

Since #323 is merged and these changes were included in that PR can we close this?

kyriediculous commented 5 years ago

Changed included in #323