From 19f93500ea648c5e91dc63891c7087680c99f64e Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 10 Jan 2023 11:33:18 +0100 Subject: [PATCH] [Marketplace] Combine host getters Co-authored-by: Eric Mastro --- contracts/Marketplace.sol | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/contracts/Marketplace.sol b/contracts/Marketplace.sol index 702813f..2900fb2 100644 --- a/contracts/Marketplace.sol +++ b/contracts/Marketplace.sol @@ -133,7 +133,7 @@ contract Marketplace is Collateral, Proofs { uint256 period ) public slotMustAcceptProofs(slotId) { _markProofAsMissing(slotId, period); - address host = _host(slotId); + address host = getHost(slotId); if (missingProofs(slotId) % slashMisses == 0) { _slash(host, slashPercentage); @@ -284,12 +284,8 @@ contract Marketplace is Collateral, Proofs { return _isCancelled(requestId); } - function _host(SlotId slotId) internal view returns (address) { - return slots[slotId].host; - } - function getHost(SlotId slotId) public view returns (address) { - return _host(slotId); + return slots[slotId].host; } function _request(