Disallow voting in dispute for miner against whom dispute has beginned

This commit is contained in:
ChronosX88 2021-04-27 21:22:09 +03:00
parent f8576cffea
commit 6a3349a9ee
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A

View File

@ -59,6 +59,7 @@ contract DioneDispute {
Dispute memory dispute = disputes[dhash]; Dispute memory dispute = disputes[dhash];
require(dispute.finished == false, "dispute already finished"); require(dispute.finished == false, "dispute already finished");
require(msg.sender != dispute.disputeInitiator, "dispute initiator isn't allowed to vote"); require(msg.sender != dispute.disputeInitiator, "dispute initiator isn't allowed to vote");
require(msg.sender != dispute.miner, "the miner against whom dispute has beginned isn't allowed to vote");
require(dioneStaking.isMiner(msg.sender), "caller isn't dione miner"); require(dioneStaking.isMiner(msg.sender), "caller isn't dione miner");
require(dioneStaking.minerStake(msg.sender) >= minStake, "miner doesn't have minimum stake to vote"); require(dioneStaking.minerStake(msg.sender) >= minStake, "miner doesn't have minimum stake to vote");
uint256 stake = dioneStaking.minerStake(msg.sender); uint256 stake = dioneStaking.minerStake(msg.sender);