-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Comments: More comments on functions/globals in standard.h. #11058
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
Conversation
TheBlueMatt
left a comment
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.
Thanks for this!
src/script/standard.h
Outdated
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.
Looks like you lost the stuff noting what vSolutionsRet is when you moved the comment from standard.cpp.
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.
(specifically that vSolutionsRet is a vector of the public keys or hashes from the scriptPubKey)
src/script/standard.h
Outdated
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.
(per transaction)
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.
I'm not sure if that's necessary to add here. This is the byte limit for OP_RETURN scripts, then IsStandardTx further restricts the number of OP_RETURN outputs per tx to 1. If this comment were to say per transaction it sort of implies that the data can be split across multiple OP_RETURN outputs as long as the limit is not exceeded.
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.
Ahh, missed that it was applied per-scriptPubKey and had an independant per-tx limit, yea, fine as-is.
src/script/standard.h
Outdated
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.
Maybe note that this only works on some standard scriptPubKey types (eg currently does not work on segwit types, nor null_data, for obvious reasons).
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.
Happy to add if you prefer, but that seems like something that the implementation might change. Is it possible that a new CTxDestination for witness programs will be added? It's also interesting that this function does not return a CNoDestination for TX_NULL_DATA scripts.
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.
Sure, but we can also update the comment when the implementation changes to support more :)
85dc710 to
b755f91
Compare
b755f91 to
360b464
Compare
TheBlueMatt
left a comment
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.
ACK 360b464
src/script/standard.h
Outdated
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.
Ahh, missed that it was applied per-scriptPubKey and had an independant per-tx limit, yea, fine as-is.
src/script/standard.h
Outdated
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.
Sure, but we can also update the comment when the implementation changes to support more :)
|
ACK 360b464, thanks for adding documentation |
…d.h. 360b464 Comments: More comments on functions/globals in standard.h. (Jim Posen) Pull request description: I was confused about what "data carrier" meant, so I wanted to comment the `fAcceptDatacarrier` and `nMaxDatacarrierBytes` fields specifically. Then I figured I'd add docs for the rest of the functions. Tree-SHA512: e6d0cfe6f4a2ab52ae76f984b1f5d8de371ae938e7832be8b02517d868f1caea62fec8888c917a2bd3d8ef74025de7f00dc96923fa56436dc6b190626652bf29
…standard.h. 360b464 Comments: More comments on functions/globals in standard.h. (Jim Posen) Pull request description: I was confused about what "data carrier" meant, so I wanted to comment the `fAcceptDatacarrier` and `nMaxDatacarrierBytes` fields specifically. Then I figured I'd add docs for the rest of the functions. Tree-SHA512: e6d0cfe6f4a2ab52ae76f984b1f5d8de371ae938e7832be8b02517d868f1caea62fec8888c917a2bd3d8ef74025de7f00dc96923fa56436dc6b190626652bf29
Bitcoin script PRs 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6335 - bitcoin/bitcoin#6424 - bitcoin/bitcoin#11058 - bitcoin/bitcoin#12460 - bitcoin/bitcoin#13194 Part of #2074.
…standard.h. 360b464 Comments: More comments on functions/globals in standard.h. (Jim Posen) Pull request description: I was confused about what "data carrier" meant, so I wanted to comment the `fAcceptDatacarrier` and `nMaxDatacarrierBytes` fields specifically. Then I figured I'd add docs for the rest of the functions. Tree-SHA512: e6d0cfe6f4a2ab52ae76f984b1f5d8de371ae938e7832be8b02517d868f1caea62fec8888c917a2bd3d8ef74025de7f00dc96923fa56436dc6b190626652bf29 remove witness Signed-off-by: Pasta <[email protected]>
…standard.h. 360b464 Comments: More comments on functions/globals in standard.h. (Jim Posen) Pull request description: I was confused about what "data carrier" meant, so I wanted to comment the `fAcceptDatacarrier` and `nMaxDatacarrierBytes` fields specifically. Then I figured I'd add docs for the rest of the functions. Tree-SHA512: e6d0cfe6f4a2ab52ae76f984b1f5d8de371ae938e7832be8b02517d868f1caea62fec8888c917a2bd3d8ef74025de7f00dc96923fa56436dc6b190626652bf29 remove witness Signed-off-by: Pasta <[email protected]>
I was confused about what "data carrier" meant, so I wanted to comment the
fAcceptDatacarrierandnMaxDatacarrierBytesfields specifically. Then I figured I'd add docs for the rest of the functions.