Skip to content

Commit fd2bbe3

Browse files
committed
wallet: Remove panic in read_keychain_descriptors
1 parent c7566f9 commit fd2bbe3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/wallet.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ impl Store {
114114
let keychain = match keychain {
115115
0 => KeychainKind::External,
116116
1 => KeychainKind::Internal,
117-
_ => panic!("unsupported keychain kind"),
117+
_ => {
118+
debug_assert!(false, "keychain must map to a value of 0 or 1");
119+
continue;
120+
}
118121
};
119122
let descriptor: String = row.get("descriptor");
120123
let descriptor = Descriptor::from_str(&descriptor)?;

0 commit comments

Comments
 (0)