Skip to content

get_descriptor_for_keychain(KeychainKind::Internal) should return None if there is no internal keychain #525

@w0xlt

Description

@w0xlt

The code below returns the external descriptor.

I understand that external descriptor will be used as (internal) change descriptor if it does not exist, but I think it would be better and less ambiguous if the function returned None or Error when explicitly calling the internal descriptor.

This would also make a better distinction between external and internal descriptors and be more in line with the wallet structure.

let wallet = Wallet::new_offline(
        "<desc>",
        None,
        network,
        MemoryDatabase::default(),
)
.unwrap();

let desc = wallet.get_descriptor_for_keychain(KeychainKind::Internal);

println!("desc: {}", desc.to_string());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions