This PR updates BondingManager.getTotalBonded() to return currentRoundTotalActiveStake instead of iterating through the current members of the transcoder pool. This change saves gas during round initialization - instead of using N SLOADs (where N is the size of the pool) getTotalBonded() uses a single SLOAD because currentRoundTotalActiveStake would have been already set by the call to BondingManager.setCurrentRoundTotalActiveStake() earlier during round initialization.
This PR updates
BondingManager.getTotalBonded()
to returncurrentRoundTotalActiveStake
instead of iterating through the current members of the transcoder pool. This change saves gas during round initialization - instead of using N SLOADs (where N is the size of the pool)getTotalBonded()
uses a single SLOAD becausecurrentRoundTotalActiveStake
would have been already set by the call toBondingManager.setCurrentRoundTotalActiveStake()
earlier during round initialization.Fixes #334