Skip to content

Commit ed2d775

Browse files
committed
Merge bitcoin/bitcoin#30408: rpc: doc: use "output script" terminology consistently in "asm"/"hex" results
29eafd5 rpc: doc: use "output script" terminology consistently in "asm"/"hex" results (Sebastian Falbesoner) Pull request description: The wording "public key script" was likely chosen as a human-readable form of the technical term `scriptPubKey`, but it doesn't seem to be really widespread. Replace it by the more (probably most?) common term "output script" instead. Note that the argument for the `decodescript` RPC is not necessarily an output script (it could e.g. be also a redeem script), so in this case we just stay generic and use "script". See also the draft BIP "Terminology for Transaction Components" (https://github.com/murchandamus/bips/blob/2022-04-tx-terminology/bip-tx-terminology.mediawiki) from murchandamus which suggests to use "output script" as well. Affects the help text of the following RPCs: - decodepsbt - decoderawtransaction - decodescript - getblock (if verbosity=3) - getrawtransaction (if verbosity=2,3) - gettxout ACKs for top commit: maflcko: ACK 29eafd5 achow101: ACK 29eafd5 BrandonOdiwuor: ACK 29eafd5 tdb3: ACK 29eafd5 Tree-SHA512: 62eb92d42bc44e36dc3090df7b248a123868a74af253d2046de02086e688bf6ff98307b927ba2fee3d599f85e073aeb8eca90ed15105ca63b648b6796cfa340b
2 parents 8ae79f1 + 29eafd5 commit ed2d775

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/rpc/blockchain.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ const RPCResult getblock_vin{
655655
{RPCResult::Type::STR_AMOUNT, "value", "The value in " + CURRENCY_UNIT},
656656
{RPCResult::Type::OBJ, "scriptPubKey", "",
657657
{
658-
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
658+
{RPCResult::Type::STR, "asm", "Disassembly of the output script"},
659659
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
660-
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
660+
{RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
661661
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
662662
{RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"},
663663
}},
@@ -1082,9 +1082,9 @@ static RPCHelpMan gettxout()
10821082
{RPCResult::Type::NUM, "confirmations", "The number of confirmations"},
10831083
{RPCResult::Type::STR_AMOUNT, "value", "The transaction value in " + CURRENCY_UNIT},
10841084
{RPCResult::Type::OBJ, "scriptPubKey", "", {
1085-
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
1085+
{RPCResult::Type::STR, "asm", "Disassembly of the output script"},
10861086
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
1087-
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
1087+
{RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
10881088
{RPCResult::Type::STR, "type", "The type, eg pubkeyhash"},
10891089
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
10901090
}},

src/rpc/rawtransaction.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue&
8585
static std::vector<RPCResult> ScriptPubKeyDoc() {
8686
return
8787
{
88-
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
88+
{RPCResult::Type::STR, "asm", "Disassembly of the output script"},
8989
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
90-
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
90+
{RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
9191
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
9292
{RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"},
9393
};
@@ -506,18 +506,18 @@ static RPCHelpMan decodescript()
506506
RPCResult{
507507
RPCResult::Type::OBJ, "", "",
508508
{
509-
{RPCResult::Type::STR, "asm", "Script public key"},
509+
{RPCResult::Type::STR, "asm", "Disassembly of the script"},
510510
{RPCResult::Type::STR, "desc", "Inferred descriptor for the script"},
511511
{RPCResult::Type::STR, "type", "The output type (e.g. " + GetAllOutputTypes() + ")"},
512512
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
513513
{RPCResult::Type::STR, "p2sh", /*optional=*/true,
514514
"address of P2SH script wrapping this redeem script (not returned for types that should not be wrapped)"},
515515
{RPCResult::Type::OBJ, "segwit", /*optional=*/true,
516-
"Result of a witness script public key wrapping this redeem script (not returned for types that should not be wrapped)",
516+
"Result of a witness output script wrapping this redeem script (not returned for types that should not be wrapped)",
517517
{
518-
{RPCResult::Type::STR, "asm", "String representation of the script public key"},
519-
{RPCResult::Type::STR_HEX, "hex", "Hex string of the script public key"},
520-
{RPCResult::Type::STR, "type", "The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)"},
518+
{RPCResult::Type::STR, "asm", "Disassembly of the output script"},
519+
{RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
520+
{RPCResult::Type::STR, "type", "The type of the output script (e.g. witness_v0_keyhash or witness_v0_scripthash)"},
521521
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
522522
{RPCResult::Type::STR, "desc", "Inferred descriptor for the script"},
523523
{RPCResult::Type::STR, "p2sh-segwit", "address of the P2SH script wrapping this witness redeem script"},
@@ -833,9 +833,9 @@ const RPCResult decodepsbt_inputs{
833833
{RPCResult::Type::NUM, "amount", "The value in " + CURRENCY_UNIT},
834834
{RPCResult::Type::OBJ, "scriptPubKey", "",
835835
{
836-
{RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
836+
{RPCResult::Type::STR, "asm", "Disassembly of the output script"},
837837
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
838-
{RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
838+
{RPCResult::Type::STR_HEX, "hex", "The raw output script bytes, hex-encoded"},
839839
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
840840
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
841841
}},

0 commit comments

Comments
 (0)