doc: offline-signing-tutorial.md uses `>>` (append) instead of `>` (overwrite) for one-shot PSBT files #35862

issue GuTS805 opened this issue on August 1, 2026
  1. GuTS805 commented at 9:17 PM on August 1, 2026: none

    doc/offline-signing-tutorial.md redirects PSBT output with append (>>) instead of overwrite (>) in two places:

    • doc/offline-signing-tutorial.md:115 — ... | jq -r '.psbt' >> /path/to/funded_psbt.txt
    • doc/offline-signing-tutorial.md:173 — ... | jq -r .hex >> /path/to/final_psbt.txt

    Every later step treats these files as holding exactly one string, consumed via unquoted $(cat ...):

    • doc/offline-signing-tutorial.md:127, :133 — decodepsbt $(cat /path/to/funded_psbt.txt), analyzepsbt $(cat ...)
    • doc/offline-signing-tutorial.md:170-171 — walletprocesspsbt $(cat /path/to/funded_psbt.txt) ...
    • doc/offline-signing-tutorial.md:180 — sendrawtransaction $(cat /path/to/final_psbt.txt)

    If a reader re-runs the send step (e.g. after a typo'd amount, or to redo the flow) without deleting the output file first, >> appends a second PSBT line instead of replacing it. Unquoted $(cat file) then word-splits on the newline, turning one intended argument into two, which every consuming RPC (decodepsbt, analyzepsbt, walletprocesspsbt, sendrawtransaction) rejects as too many arguments — a confusing dead end in a tutorial whose entire point is careful, security-conscious key handling.

    Verified mechanics:

    ``` $ bash -c 'f=/tmp/t.txt; rm -f "$f"; echo a >> "$f"; echo b >> "$f"; foo(){ echo argc=$#; }; foo $(cat "$f")' argc=2 ```

    Proposed fix: change both >> to > (2 characters, 2 lines, doc-only, zero code/consensus/P2P risk).

  2. GuTS805 commented at 9:18 PM on August 1, 2026: none

    Happy to open a PR for this if maintainers agree it's worth fixing it's a 2-line, doc-only change with no functional/consensus impact.

  3. maflcko added the label Docs on Aug 2, 2026
  4. maflcko added the label Wallet on Aug 2, 2026

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: 2026-08-10 11:50 UTC

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