[chore] clean up bytes32 parameters
Change the names of some bytes32 parameters to `slotId` and `requestId` to avoid confusion.
This commit is contained in:
parent
9ab65ae5a6
commit
08a3fbb12b
|
@ -108,8 +108,8 @@ contract Marketplace is Collateral, Proofs {
|
||||||
return _timeout();
|
return _timeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
function proofEnd(bytes32 contractId) public view returns (uint256) {
|
function proofEnd(bytes32 slotId) public view returns (uint256) {
|
||||||
return _end(contractId);
|
return _end(slotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function price(Request calldata request) private pure returns (uint256) {
|
function price(Request calldata request) private pure returns (uint256) {
|
||||||
|
|
|
@ -32,42 +32,42 @@ contract Storage is Collateral, Marketplace {
|
||||||
slashPercentage = _slashPercentage;
|
slashPercentage = _slashPercentage;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRequest(bytes32 id) public view returns (Request memory) {
|
function getRequest(bytes32 requestId) public view returns (Request memory) {
|
||||||
return _request(id);
|
return _request(requestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHost(bytes32 id) public view returns (address) {
|
function getHost(bytes32 requestId) public view returns (address) {
|
||||||
return _host(id);
|
return _host(requestId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function missingProofs(bytes32 contractId) public view returns (uint256) {
|
function missingProofs(bytes32 slotId) public view returns (uint256) {
|
||||||
return _missed(contractId);
|
return _missed(slotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isProofRequired(bytes32 contractId) public view returns (bool) {
|
function isProofRequired(bytes32 slotId) public view returns (bool) {
|
||||||
return _isProofRequired(contractId);
|
return _isProofRequired(slotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function willProofBeRequired(bytes32 contractId) public view returns (bool) {
|
function willProofBeRequired(bytes32 slotId) public view returns (bool) {
|
||||||
return _willProofBeRequired(contractId);
|
return _willProofBeRequired(slotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChallenge(bytes32 contractId) public view returns (bytes32) {
|
function getChallenge(bytes32 slotId) public view returns (bytes32) {
|
||||||
return _getChallenge(contractId);
|
return _getChallenge(slotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPointer(bytes32 id) public view returns (uint8) {
|
function getPointer(bytes32 slotId) public view returns (uint8) {
|
||||||
return _getPointer(id);
|
return _getPointer(slotId);
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitProof(bytes32 contractId, bytes calldata proof) public {
|
function submitProof(bytes32 slotId, bytes calldata proof) public {
|
||||||
_submitProof(contractId, proof);
|
_submitProof(slotId, proof);
|
||||||
}
|
}
|
||||||
|
|
||||||
function markProofAsMissing(bytes32 contractId, uint256 period) public {
|
function markProofAsMissing(bytes32 slotId, uint256 period) public {
|
||||||
_markProofAsMissing(contractId, period);
|
_markProofAsMissing(slotId, period);
|
||||||
if (_missed(contractId) % slashMisses == 0) {
|
if (_missed(slotId) % slashMisses == 0) {
|
||||||
_slash(_host(contractId), slashPercentage);
|
_slash(_host(slotId), slashPercentage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue