Skip to content

Commit 386affc

Browse files
committed
Helper getters for active transcoder set
1 parent 47d7eae commit 386affc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

contracts/bonding/BondingManager.sol

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,23 @@ contract BondingManager is ManagerProxyTarget, IBondingManager {
783783
return totalBonded;
784784
}
785785

786+
/*
787+
* @dev Return total active stake for a round
788+
* @param _round Round number
789+
*/
790+
function getTotalActiveStake(uint256 _round) public view returns (uint256) {
791+
return activeTranscoderSet[_round].totalStake;
792+
}
793+
794+
/*
795+
* @dev Return whether a transcoder was active during a round
796+
* @param _transcoder Transcoder address
797+
* @param _round Round number
798+
*/
799+
function isActiveTranscoder(address _transcoder, uint256 _round) public view returns (bool) {
800+
return activeTranscoderSet[_round].isActive[_transcoder];
801+
}
802+
786803
/*
787804
* @dev Update a transcoder with rewards
788805
* @param _transcoder Address of transcoder

0 commit comments

Comments
 (0)