Comments: More comments on functions/globals in standard.h.#11058
Comments: More comments on functions/globals in standard.h.#11058laanwj merged 1 commit intobitcoin:masterfrom
Conversation
src/script/standard.h
Outdated
There was a problem hiding this comment.
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.
(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.
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.
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.
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.
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.
Sure, but we can also update the comment when the implementation changes to support more :)
85dc710 to
b755f91
Compare
b755f91 to
360b464
Compare
src/script/standard.h
Outdated
There was a problem hiding this comment.
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.
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.