Mishandled “unknown” Address Type #27472

issue Pttn openend this issue on April 16, 2023
  1. Pttn commented at 9:16 pm on April 16, 2023: contributor

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Bitcoin Core behaves unexpectedly or even crashes.

    • getnewaddress "" unknown: “Error: No unknown addresses available. (code -12)”
    • getrawchangeaddress unknown: “Error: No unknown addresses available. (code -12)”
    • createmultisig 2 '["03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd", "03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626"]' unknown: Bitcoin-Qt crashes with Assertion Error: “bitcoin-qt: outputtype.cpp:110: CTxDestination AddAndGetDestinationForScript(FillableSigningProvider&, const CScript&, OutputType): Assertion `false’ failed.”
    • Bitcoin-Qt can be started with -addresstype=unknown or -changetype=unknown without any error message.

    Expected behaviour

    Bitcoin Core tells me something like “Unknown address type ‘unknown’ (code -5)”, as if I used any type that is not legacy, p2sh-segwit, bech32, or bech32m.

    Steps to reproduce

    Open Bitcoin-Qt Console, create/open a wallet with appropriate settings if necessary, and run the commands above.

    Or start it with -addresstype=unknown or -changetype=unknown.

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master@b22c275582cc

    Operating system and version

    Debian 12 (Testing)

    Machine specifications

    No response

  2. achow101 added this to the milestone 25.0 on Apr 16, 2023
  3. Pttn referenced this in commit dfec3842ef on Apr 16, 2023
  4. Pttn referenced this in commit 0d6383fda0 on Apr 16, 2023
  5. maflcko commented at 8:25 am on April 17, 2023: member
    I wonder if src/test/fuzz/rpc.cpp should be updated to include a wallet somehow to catch issues like this
  6. fanquake referenced this in commit 0bac52d5cf on Apr 17, 2023
  7. achow101 closed this on Apr 17, 2023

  8. achow101 referenced this in commit 4ad20a2258 on Apr 17, 2023
  9. sidhujag referenced this in commit dafb6f11ce on Apr 17, 2023
  10. RandyMcMillan referenced this in commit 8fbbed9bf0 on May 27, 2023
  11. janus referenced this in commit 044cac3b92 on Sep 3, 2023
  12. backpacker69 referenced this in commit 77585b1166 on Mar 5, 2024
  13. bitcoin locked this on Apr 16, 2024


Pttn maflcko

Milestone
25.0


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: 2024-12-22 06:12 UTC

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