mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-08 16:23:12 +00:00
marketplace: remove accounting that is now done by vault
This commit is contained in:
parent
e60ff36202
commit
06a9e417b2
@ -493,33 +493,6 @@ contract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian {
|
||||
return _requestContexts[requestId].expiresAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* @notice Calculates the amount that should be paid out to a host that successfully finished the request
|
||||
* @param requestId RequestId of the request used to calculate the payout
|
||||
* amount.
|
||||
* @param start timestamp indicating when a host filled a slot and
|
||||
* started providing proofs.
|
||||
*/
|
||||
function _slotPayout(
|
||||
RequestId requestId,
|
||||
Timestamp start
|
||||
) private view returns (uint256) {
|
||||
return _slotPayout(requestId, start, _requestContexts[requestId].endsAt);
|
||||
}
|
||||
|
||||
/// @notice Calculates the amount that should be paid out to a host based on the specified time frame.
|
||||
function _slotPayout(
|
||||
RequestId requestId,
|
||||
Timestamp start,
|
||||
Timestamp end
|
||||
) private view returns (uint256) {
|
||||
Request storage request = _requests[requestId];
|
||||
if (end <= start) {
|
||||
revert Marketplace_StartNotBeforeExpiry();
|
||||
}
|
||||
return request.ask.pricePerSlotPerSecond().accumulate(start.until(end));
|
||||
}
|
||||
|
||||
function getHost(SlotId slotId) public view returns (address) {
|
||||
return _slots[slotId].host;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user