NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 442 forks source link

Change host duration check to use startheight vs endheight of window #3088

Closed ChrisSchinnerl closed 6 years ago

ChrisSchinnerl commented 6 years ago

This PR changes the duration check in the host module to use the window's startheight instead of the endheight. From a renter's perspective the host can't be expected to hold on to the file after the window start since the host might just broadcast the proof and delete the files afterwards. That's why the duration of a contract is defined as the number of blocks between the startHeight of the contract and the start of the proof window.