re: #31596 (review)
Could we unify the rest as well
To follow up, I looked at occurrences of "txid"
, "wtxid"
, and "hash"
(quoted strings) in the RPC code and found dozens of fields that could be updated to be consistent. It seems more challenging than I expected to update all the documentation, and now I’m also wondering if might actually be harmful to mention reversed bytes in some cases but not others, because this might give the wrong impression that bytes are not always reversed for every hash field.
I wonder if maybe a better approach to provide more consistency could be to introduce new RPC types like STR_TXID
, and STR_WTXID
and use them instead of the more generic STR_HEX
type, so specific documentation about the meanings of these hashes could be incorporated into the type documentation and not repeated in field descriptions.