Skip to content

Commit 5cdc2e6

Browse files
committed
Use groupSelectionStarterContract to reimburse for failed DKG
In startGroupSelection we return the costs of the previous - failed - group selection to the service contract. We were obtaining the service contract reference with `ServiceContract(msg.sender)`. It works fine only when `msg.sender` is a service contract which is not a case for genesis. Instead of `msg.sender` we should use `groupSelectionStarterContract` that is set for this exact purpose in `genesis` and `createGroup` both calling the internal `startGroupSelection`.
1 parent 3b0d2e4 commit 5cdc2e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solidity/contracts/KeepRandomBeaconOperator.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ contract KeepRandomBeaconOperator is ReentrancyGuard {
238238
if (dkgSubmitterReimbursementFee > 0) {
239239
uint256 surplus = dkgSubmitterReimbursementFee;
240240
dkgSubmitterReimbursementFee = 0;
241-
ServiceContract(msg.sender).fundDkgFeePool.value(surplus)();
241+
ServiceContract(groupSelectionStarterContract).fundDkgFeePool.value(surplus)();
242242
}
243243

244244
groupSelection.minimumStake = stakingContract.minimumStake();

0 commit comments

Comments
 (0)