doc: update CWallet::SignTransaction doc to mention SIGHASH_DEFAULT #32411

pull rkrux wants to merge 1 commits into bitcoin:master from rkrux:sighash-default-doc changing 1 files +1 −1
  1. rkrux commented at 8:21 am on May 3, 2025: contributor

    While SIGHASH_DEFAULT & SIGHASH_ALL are effectively the same, it’s helpful to mention in the function doc exactly what’s present in the code.

    It can be seen in the function implementation that SIGHASH_DEFAULT is passed to the overloaded SignTransaction function.

    Ref: https://github.com/bitcoin/bitcoin/blob/f490f5562d4b20857ef8d042c050763795fd43da/src/wallet/wallet.cpp#L2177-L2194

  2. doc: update CWallet::SignTransaction doc to mention SIGHASH_DEFAULT
    While `SIGHASH_DEFAULT` & `SIGHASH_ALL` are effectively the same,
    it's helpful to mention in the function doc exactly what's present
    in the code.
    
    It can be seen in the function implementation that `SIGHASH_DEFAULT`
    is passed to the overloaded `SignTransaction` function.
    
    Ref: https://github.com/bitcoin/bitcoin/blob/f490f5562d4b20857ef8d042c050763795fd43da/src/wallet/wallet.cpp#L2177-L2194
    11ff4c9641
  3. DrahtBot commented at 8:21 am on May 3, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32411.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Docs on May 3, 2025
  5. fanquake requested review from Sjors on May 13, 2025
  6. Sjors commented at 11:49 am on May 13, 2025: member

    They’re only the same for Taproot inputs.

    cc @achow101

  7. achow101 commented at 5:34 pm on May 13, 2025: member
    DEFAULT and ALL are effectively the same for Taproot inputs, and DEFAULT is an alias for ALL for non-taproot inputs. I don’t think that this change is meaningfully useful as ALL and DEFAULT are essentially aliases for each other, and mean basically the same thing.
  8. rkrux commented at 5:49 pm on May 13, 2025: contributor

    True. The main reason for this change was that I didn’t see any benefit in leaving ALL around in the function documentation when the implementation uses DEFAULT.

    I am open to closing this PR later if this doesn’t seem like a strong enough reason.

  9. rkrux closed this on May 26, 2025


rkrux DrahtBot Sjors achow101


Sjors

Labels
Docs


github-metadata-mirror

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: 2025-05-30 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me