Skip to content

Mishandled "unknown" Address Type #27472

@Pttn

Description

@Pttn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions