-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
I want a testnet descriptor key, but get a mainnet descriptor key.
To Reproduce
#[test]
fn test_override() {
let xpriv: GeneratedKey<Xpriv, miniscript::Segwitv0> = Xpriv::generate(()).unwrap();
let a = xpriv.into_descriptor_key(None, "m/84h/1h/0h".parse().unwrap()).unwrap();
let a = a.override_valid_networks(test_networks());
let secp = SecpCtx::new();
println!("{}", a.extract(&secp).unwrap().0);
// [be3917e7/84'/1'/0']xpub6BxR3GaY9SrwFUWTRnmu3qyit4GECypBqNJPycFbFNGLkkh4Bjszb2LGqUbuF1ogEfCTvLo8V3DwPtuqcG4An2h34LQywRmUusRFErevX4L/*
}
Expected behavior
[fingerprint/derivepath]tpubxxxxx/*
Build environment
- BDK tag/commit:
- OS+version:
- Rust/Cargo version:
- Rust/Cargo target:
Additional context
https://github.com/bitcoindevkit/bdk/blob/9af0fd4d1d039b94caeecf290897006868dbe7f6/crates/wallet/src/keys/mod.rs#L716-L718
I don't know if this flow is correct, but reading it literally it should produce a testnet descriptor. So I'm not sure if this is a bug or not.
oleonardolima
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
No status