add Nonce attribute of IssueAsset Transaction#385
Open
zhengq1 wants to merge 1 commit intoDNAProject:masterfrom
Open
add Nonce attribute of IssueAsset Transaction#385zhengq1 wants to merge 1 commit intoDNAProject:masterfrom
zhengq1 wants to merge 1 commit intoDNAProject:masterfrom
Conversation
gasby88
reviewed
Aug 9, 2017
| func (a *IssueAsset) Deserialize(r io.Reader, version byte) error { | ||
| var err error | ||
| a.Nonce, err = serialization.ReadUint64(r) | ||
| if err != nil { |
Contributor
There was a problem hiding this comment.
Cannot judge to err, return err directly.
gasby88
reviewed
Aug 9, 2017
| } | ||
|
|
||
| func (a *IssueAsset) Serialize(w io.Writer, version byte) error { | ||
| err := serialization.WriteUint64(w, a.Nonce) |
Contributor
There was a problem hiding this comment.
Cannot judge to err, return err directly.
return serialization.WriteUint64(w, a.Nonce)
Signed-off-by: zhengq1 <ljqlyy@gmail.com>
31f316a to
8dd808b
Compare
Contributor
Author
|
got it. |
dreamfly281
requested changes
Aug 15, 2017
Collaborator
dreamfly281
left a comment
There was a problem hiding this comment.
There is already a nonce existed in the Transaction header, it looks duplicate to add another nonce field in the payload
Contributor
Author
|
Nonce in transaction struct is reserved for balance model, if use UTXO model, transaction which need nonce can add it to payload. |
Member
|
agree with zhengq1, this nonce is used to allow issuer to create multiple issue transaction with the just same value. |
Honglei-Cong
pushed a commit
to Honglei-Cong/DNA
that referenced
this pull request
Nov 27, 2019
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.
Signed-off-by: zhengq1 ljqlyy@gmail.com