-
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
RHP4 spec changes #219
RHP4 spec changes #219
Conversation
types,consensus: Add Capacity field to V2FileContract
@@ -715,6 +715,8 @@ func validateV2FileContracts(ms *MidState, txn types.V2Transaction) error { | |||
|
|||
validateContract := func(fc types.V2FileContract, renewal bool) error { | |||
switch { | |||
case fc.Filesize > fc.Capacity: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be that we are missing fc.Filesize % SectorSize == 0
checks? Same for capacity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SectorSize
is not a consensus concept, only an RHP one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukechampine what about SegmentSize
?
Co-authored-by: Christopher Schinnerl <[email protected]>
Fixes #218
Requires #220