Conversation
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
jsign
commented
Mar 9, 2021
| @@ -1,4 +1,4 @@ | |||
| package module | |||
| package lotuswallet | |||
Contributor
Author
There was a problem hiding this comment.
Exploring moving away from module package names, too generic.
Comment on lines
+137
to
+149
| if cfg.VerifiedDeal { | ||
| vci, err := fc.wm.GetVerifiedClientInfo(ctx, cfg.Addr) | ||
| if err != nil && err != wallet.ErrNoVerifiedClient { | ||
| return nil, nil, 0, fmt.Errorf("get address verified client info: %s", err) | ||
| } | ||
| if err == wallet.ErrNoVerifiedClient { | ||
| return nil, nil, 0, fmt.Errorf("wallet address isn't a verified client") | ||
| } | ||
| pieceSizeBig := big.NewInt(int64(pieceSize)) | ||
| if pieceSizeBig.Cmp(vci.RemainingDatacapBytes) == 1 { | ||
| return nil, nil, 0, fmt.Errorf("the remaining data-cap %d MiB is less than piece-size %d MiB", pieceSize/1024/1024, vci.RemainingDatacapBytes.Uint64()/1024/1024) | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Fail-fast logic to unverified or not-enough-data-cap situations.
| VerifiedClientInfo verified_client_info = 5; | ||
|
|
||
| message VerifiedClientInfo { | ||
| string remaining_datacap_bytes = 1; |
Contributor
Author
There was a problem hiding this comment.
This is string since the native type is BigInt, so in some extreme case, the user could have a lot of verified deal capacity.
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
Addresses(...)API information about verified-addresses.