[Marketplace] Combine host getters

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
This commit is contained in:
Mark Spanbroek 2023-01-10 11:33:18 +01:00 committed by markspanbroek
parent ce335d0568
commit 19f93500ea
1 changed files with 2 additions and 6 deletions

View File

@ -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(