`rust-bitcoin` 0.30 added `#[non_exhaustive]` to the `Network`
enum, allowing them to "add support" for a new network type without
a major version change in the future. When upgrading, we added a
simple `unreachable` for the general match arm, which would break
in a minor version change of `rust-bitcoin`.
While it seems [possible rust-bitcoin will change
this](https://github.com/rust-bitcoin/rust-bitcoin/issues/2225),
we still shouldn't ba panicking, which we drop here in favor of a
`debug_assert`ion, and a default value.
Network::Testnet => Currency::BitcoinTestnet,
Network::Regtest => Currency::Regtest,
Network::Signet => Currency::Signet,
- _ => unreachable!(),
+ _ => {
+ debug_assert!(false, "Need to handle new rust-bitcoin network type");
+ Currency::Regtest
+ },
}
}
}