From 6c52f60381f06c84db307db514bccf4387b77de4 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Wed, 23 Nov 2022 15:11:24 +0100 Subject: [PATCH] [marketplace] Formatting --- contracts/Storage.sol | 14 +++++++++----- contracts/TestMarketplace.sol | 8 +++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/contracts/Storage.sol b/contracts/Storage.sol index 97098bd..2736983 100644 --- a/contracts/Storage.sol +++ b/contracts/Storage.sol @@ -35,7 +35,11 @@ contract Storage is Collateral, Marketplace { minCollateralThreshold = _minCollateralThreshold; } - function getRequest(RequestId requestId) public view returns (Request memory) { + function getRequest(RequestId requestId) + public + view + returns (Request memory) + { return _request(requestId); } @@ -52,21 +56,21 @@ contract Storage is Collateral, Marketplace { } function isProofRequired(SlotId slotId) public view returns (bool) { - if(!_slotAcceptsProofs(slotId)) { + if (!_slotAcceptsProofs(slotId)) { return false; } return _isProofRequired(_toProofId(slotId)); } function willProofBeRequired(SlotId slotId) public view returns (bool) { - if(!_slotAcceptsProofs(slotId)) { + if (!_slotAcceptsProofs(slotId)) { return false; } return _willProofBeRequired(_toProofId(slotId)); } function getChallenge(SlotId slotId) public view returns (bytes32) { - if(!_slotAcceptsProofs(slotId)) { + if (!_slotAcceptsProofs(slotId)) { return bytes32(0); } return _getChallenge(_toProofId(slotId)); @@ -88,7 +92,7 @@ contract Storage is Collateral, Marketplace { _markProofAsMissing(proofId, period); address host = _host(slotId); if (_missed(_toProofId(slotId)) % slashMisses == 0) { - _slash(host, slashPercentage); + _slash(host, slashPercentage); if (balanceOf(host) < minCollateralThreshold) { // When the collateral drops below the minimum threshold, the slot diff --git a/contracts/TestMarketplace.sol b/contracts/TestMarketplace.sol index 0e7c831..1f67cf3 100644 --- a/contracts/TestMarketplace.sol +++ b/contracts/TestMarketplace.sol @@ -12,7 +12,13 @@ contract TestMarketplace is Marketplace { uint256 _proofTimeout, uint8 _proofDowntime ) - Marketplace(_token, _collateral, _proofPeriod,_proofTimeout,_proofDowntime) + Marketplace( + _token, + _collateral, + _proofPeriod, + _proofTimeout, + _proofDowntime + ) // solhint-disable-next-line no-empty-blocks {