Disallow beginning dispute when beginner isn't Dione miner
This commit is contained in:
parent
0045c96940
commit
7c3e726df1
@ -41,6 +41,7 @@ contract DioneDispute {
|
||||
function beginDispute(address miner, uint256 requestID) public {
|
||||
bytes32 dhash = keccak256(abi.encodePacked(miner, requestID));
|
||||
require(disputes[dhash].miner == address(0), "dispute already exists");
|
||||
require(dioneStaking.isMiner(msg.sender), "caller isn't dione miner");
|
||||
Dispute storage dispute = disputes[dhash];
|
||||
dispute.dhash = dhash;
|
||||
dispute.sum = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user