Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions contracts/src/consensus/ConsensusV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ contract ConsensusV1 is UUPSUpgradeable, OwnableUpgradeable {

// Refund the registration fee to the validator
if (validator.fee > 0) {
uint256 refundFee = validator.fee;
validator.fee = 0;
(bool success,) = payable(msg.sender).call{value: refundFee}("");
(bool success,) = payable(msg.sender).call{value: validator.fee}("");
if (!success) {
revert RefundFailed();
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/test/consensus/Consensus-ValidatorResignation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ contract ConsensusTest is Base {
assertEq(validator.data.blsPublicKey, prepareBLSKey(addr));
assertEq(validator.data.voteBalance, 0);
assertEq(validator.data.votersCount, 0);
assertEq(validator.data.fee, 0);
assertEq(validator.data.fee, customFee); // Fee does not get reset
assertEq(validator.data.isResigned, true);
assertEq(addr.balance, 100 ether);
}
Expand Down Expand Up @@ -177,7 +177,7 @@ contract ConsensusTest is Base {
consensus.resignValidator();
}

function test_validator_resignation_revert_if_bellow_min_validators() public {
function test_validator_resignation_revert_if_below_min_validators() public {
assertEq(consensus.validatorsCount(), 0);
address addr = address(1);

Expand Down
Loading
Loading