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.
Comments: More comments on functions/globals in standard.h. #11058
pull jimpo wants to merge 1 commits into bitcoin:master from jimpo:standard-comments changing 2 files +58 −7-
jimpo commented at 1:25 AM on August 16, 2017: contributor
- fanquake added the label Docs and Output on Aug 16, 2017
-
in src/script/standard.h:89 in 85dc710354 outdated
80 | @@ -70,15 +81,49 @@ class CNoDestination { 81 | */ 82 | typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination; 83 | 84 | +/** Get the name of a txnouttype as a C string, or nullptr if unknown. */ 85 | const char* GetTxnOutputType(txnouttype t); 86 | 87 | +/** 88 | + * Parse a scriptPubKey and identify script type for standard scripts. Assigns 89 | + * the result to the typeRet reference parameter and returns true if successful.
TheBlueMatt commented at 4:17 PM on August 17, 2017:Looks like you lost the stuff noting what vSolutionsRet is when you moved the comment from standard.cpp.
jnewbery commented at 6:01 PM on August 17, 2017:(specifically that vSolutionsRet is a vector of the public keys or hashes from the scriptPubKey)
in src/script/standard.h:42 in 85dc710354 outdated
38 | + * A data carrying output is an unspendable output containing data. The script 39 | + * type is designated as TX_NULL_DATA. 40 | + */ 41 | extern bool fAcceptDatacarrier; 42 | + 43 | +/** Maximum size of TX_NULL_DATA scripts that this node considers standard. */
TheBlueMatt commented at 4:22 PM on August 17, 2017:(per transaction)
jimpo commented at 6:56 PM on August 17, 2017:I'm not sure if that's necessary to add here. This is the byte limit for OP_RETURN scripts, then
IsStandardTxfurther restricts the number of OP_RETURN outputs per tx to 1. If this comment were to sayper transactionit sort of implies that the data can be split across multiple OP_RETURN outputs as long as the limit is not exceeded.
TheBlueMatt commented at 1:32 AM on August 21, 2017:Ahh, missed that it was applied per-scriptPubKey and had an independant per-tx limit, yea, fine as-is.
in src/script/standard.h:101 in 85dc710354 outdated
89 | + * the result to the typeRet reference parameter and returns true if successful. 90 | + */ 91 | bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet); 92 | + 93 | +/** 94 | + * Parse a standard scriptPubKey for the destination address. Assigns result to
TheBlueMatt commented at 4:23 PM on August 17, 2017: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).
jimpo commented at 7:00 PM on August 17, 2017:Happy to add if you prefer, but that seems like something that the implementation might change. Is it possible that a new
CTxDestinationfor witness programs will be added? It's also interesting that this function does not return aCNoDestinationforTX_NULL_DATAscripts.
TheBlueMatt commented at 1:33 AM on August 21, 2017:Sure, but we can also update the comment when the implementation changes to support more :)
TheBlueMatt commented at 4:24 PM on August 17, 2017: memberThanks for this!
jimpo force-pushed on Aug 17, 2017Comments: More comments on functions/globals in standard.h. 360b464a08jimpo force-pushed on Aug 18, 2017TheBlueMatt commented at 1:36 AM on August 21, 2017: memberACK 360b464a08ac42a9a249b34c1a780ada2d4f610a
laanwj commented at 7:31 AM on August 22, 2017: memberACK 360b464, thanks for adding documentation
laanwj merged this on Aug 22, 2017laanwj closed this on Aug 22, 2017laanwj referenced this in commit 4b65fa5921 on Aug 22, 2017jimpo deleted the branch on Sep 1, 2017PastaPastaPasta referenced this in commit 5ee2fdfd2f on Sep 19, 2019PastaPastaPasta referenced this in commit af3f1a68e8 on Sep 23, 2019PastaPastaPasta referenced this in commit bc45fe3785 on Sep 24, 2019PastaPastaPasta referenced this in commit 07d41f9e43 on Nov 19, 2019PastaPastaPasta referenced this in commit 6ff6f08210 on Nov 21, 2019PastaPastaPasta referenced this in commit bac24a5b56 on Dec 9, 2019zkbot referenced this in commit 63c3d1ec94 on Dec 17, 2019PastaPastaPasta referenced this in commit 769817fa11 on Jan 1, 2020PastaPastaPasta referenced this in commit e86aa98259 on Jan 2, 2020PastaPastaPasta referenced this in commit 7253eb2829 on Jan 2, 2020ckti referenced this in commit 17df74b446 on Mar 28, 2021gades referenced this in commit a41e2ea71a on Jun 26, 2021MarcoFalke locked this on Sep 8, 2021ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-28 06:15 UTC
More mirrored repositories can be found on mirror.b10c.me