Skip to content

Commit f9070b5

Browse files
committed
Use onlyOwner modifier in selectSetGroup of FullyBackedSortitionPool
We use an modifier that is already defined to check if a function is called by a pool owner. The change results in a revert message change from `Only owner may select groups` to `Caller is not the owner`.
1 parent d82c022 commit f9070b5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

contracts/FullyBackedSortitionPool.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ contract FullyBackedSortitionPool is AbstractSortitionPool {
9191
uint256 groupSize,
9292
bytes32 seed,
9393
uint256 bondValue
94-
) public returns (address[] memory) {
94+
) public onlyOwner() returns (address[] memory) {
9595
PoolParams memory params = initializeSelectionParams(bondValue);
96-
require(msg.sender == params.owner, "Only owner may select groups");
96+
9797
uint256 paramsPtr;
9898
// solium-disable-next-line security/no-inline-assembly
9999
assembly {

test/fullyBackedSortitionPoolTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ contract("FullyBackedSortitionPool", (accounts) => {
173173

174174
await expectRevert(
175175
pool.selectSetGroup(3, seed, minimumBondableValue, {from: alice}),
176-
"Only owner may select groups",
176+
"Caller is not the owner",
177177
)
178178
})
179179

0 commit comments

Comments
 (0)