This repository was archived by the owner on Aug 2, 2021. It is now read-only.
Merged
Conversation
6 tasks
holisticode
reviewed
Aug 16, 2019
swap/cheque.go
Outdated
| } | ||
|
|
||
| // Sign signs the cheque with supplied private key | ||
| // Sign returns a signature for the cheque with supplied private key |
Contributor
There was a problem hiding this comment.
Isn't it more correct to say something that it returns the signed cheque? Not really "just" a signature
Contributor
Author
There was a problem hiding this comment.
where is the cheque returned, though?
Contributor
Author
There was a problem hiding this comment.
updated signature comment
holisticode
reviewed
Aug 16, 2019
| } | ||
|
|
||
| func (s *Swap) getLastChequeValues(peer enode.ID) (serial, total uint64, err error) { | ||
| err = s.loadLastSentCheque(peer) |
Contributor
There was a problem hiding this comment.
Maybe we can just return here, if there is an error, why also do getCheque and the rest?
Contributor
Author
There was a problem hiding this comment.
- would we check for
err != nilhere, or alsoerr != state.ErrNotFound? - if we take this function by itself–in the case that
loadLastSentChequefails, would we still want thelastChequefields ifexists == true?
Contributor
Author
There was a problem hiding this comment.
added err check with return statement
holisticode
approved these changes
Aug 16, 2019
Contributor
holisticode
left a comment
There was a problem hiding this comment.
OK from my side, a minor textual thing and a code adjustment I leave to your judgement what you want to do with it
holisticode
pushed a commit
that referenced
this pull request
Aug 20, 2019
* swap: add getLastChequeValues function * swap: iterate getLastChequeValues function * swap: refactor createCheque * swap: update comment for cheque Sign function * swap: update cheque Sign function comment * swap: add err check in getLastChequeValues function
holisticode
pushed a commit
that referenced
this pull request
Aug 26, 2019
* swap: add getLastChequeValues function * swap: iterate getLastChequeValues function * swap: refactor createCheque * swap: update comment for cheque Sign function * swap: update cheque Sign function comment * swap: add err check in getLastChequeValues function
holisticode
pushed a commit
that referenced
this pull request
Aug 27, 2019
* swap: add getLastChequeValues function * swap: iterate getLastChequeValues function * swap: refactor createCheque * swap: update comment for cheque Sign function * swap: update cheque Sign function comment * swap: add err check in getLastChequeValues function
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 the comment originally posted by @zelig in PR #1554: