Closed kyriediculous closed 5 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
contracts/bonding/BondingManager.sol | 69 | 70 | 98.57% | ||
<!-- | Total: | 74 | 75 | 98.67% | --> |
Totals | |
---|---|
Change from base Build 783: | -0.09% |
Covered Lines: | 749 |
Relevant Lines: | 751 |
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.
Since #323 is merged and these changes were included in that PR can we close this?
Changed included in #323
What does this pull request do? Explain your changes. (required)
Registered
status to indicate self-bonding as a willingness to be a transcoderSpecific updates (required)
setNumTranscoders()
functionisRegisteredTranscoder
to indicate self-bondingtranscoderStatus()
method, instead we now haveisActiveTranscoder()
andisRegisteredTranscoder()
that return boolean valuesnumActiveTranscoders
variable, instead we can get the size/maxSize of transcoderPool with the public helpersbondingManager.setCurrentRoundTotalActiveStake()
upon round init to setnextRoundTotalActiveStake
to thecurrentRoundTotalActiveStake
npm run test:describe
to run tests for describe blocks (uses mocha's grep feature with-g
flag)lastActiveStakeUpdateRound
that keeps track of the round in which an active transcoder's stake was last updatedHow 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: