initial commit of metadata on supports#312
Merged
BrannonKing merged 2 commits intomasterfrom Sep 13, 2019
Merged
Conversation
bvbfan
reviewed
Sep 9, 2019
| return false; | ||
| } | ||
| auto last_drop = OP_DROP; | ||
| if (opcode >= 0 && opcode <= OP_PUSHDATA4 && op != OP_CLAIM_NAME) |
Collaborator
There was a problem hiding this comment.
It does not look correct or we miss OP_SUPPORT_CLAIM && !allowSupportMetadata it's same as OP_CLAIM_NAME ?
Collaborator
There was a problem hiding this comment.
switch (op) {
case OP_SUPPORT_CLAIM:
if (allowSupportMetadata)
// fallthrough
case OP_UPDATE_CLAIM: {
if (opcode < 0 || opcode > OP_PUSHDATA4)
return false;
if (!scriptIn.GetOp(pc, opcode))
return false;
} // fallthrough
case OP_CLAIM_NAME:
if (opcode != OP_2DROP)
return false;
break;
}
Member
Author
There was a problem hiding this comment.
I don't understand your concern here. The logic is "if not a claim op and have another data chunk", that's fine -- that's what we want. That third data is required on the update op but not required on the support op.
Collaborator
There was a problem hiding this comment.
I was afraid on op == OP_SUPPORT_CLAIM and allowSupportMetadata == false we can enter in by the condition but opcode is OP_2DROP so it's OK.
182203d to
3169248
Compare
3169248 to
5ab638e
Compare
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.
The nonstandard transactions themselves should be okay in the current code; we just don't want a different hash or trie computation until the fork height.
Fixes #272