-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add renewedTo
field to RPCLastestRevision
response
#246
Comments
@n8maninger I created this issue since it is something we discussed and after thinking about it I think it would be useful to have. Makes it easier to avoid failed interactions with hosts and also some of the contract maintenance checks. |
Thinking about this more: instead of a |
Sounds good to me. I don't feel strongly about either approach. The resolution might be a bit nicer since we only need to send another byte. |
Perhaps make it struct {
Contract types.V2FileContractElement // latest on-chain revision
Revision *types.V2FileContractRevision // latest off-chain revision, if it exists
Resolution types.V2FileContractResolutionType // non-nil if contract has been resolved
} |
In v2 a renter has no way of knowing whether a contract has been renewed when fetching a revision. So if a renter for some reason misses the fact that the contract was renewed (e.g. due to a crash mid-renewal), it would be nice of the host to tell the renter about it via a
renewedTo
field. Previously we used the max revision number for that but we don't have that anymore.The text was updated successfully, but these errors were encountered: