Commit 86863d2 1 parent dc39220 commit 86863d2 Copy full SHA for 86863d2
File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -245,5 +245,13 @@ mod tests {
245
245
"Multiple BIP32 addresses do not match expected"
246
246
) ;
247
247
}
248
+
249
+ /// Test BIP32 Bitcoin Cash xpub parsing with a short invalid xpub and checks if an error is returned
250
+ #[ test]
251
+ fn test_bip32_bhc_short_invalid_xpub ( ) {
252
+ let invalid_xpub = "xpub123" ;
253
+ let result = Xpub :: from_base58 ( invalid_xpub, CoinType :: BitcoinCash ) ;
254
+ assert ! ( result. is_err( ) , "Short xpub fail for BIP32 Bitcoin Cash" ) ;
255
+ }
248
256
}
249
257
}
Original file line number Diff line number Diff line change @@ -390,5 +390,13 @@ mod test {
390
390
)
391
391
}
392
392
}
393
+
394
+ /// Test BIP44 Bitcoin Cash xpub parsing with a short invalid xpub and checks if an error is returned
395
+ #[ test]
396
+ fn test_bip44_bhc_short_invalid_xpub ( ) {
397
+ let invalid_xpub = "xpub123" ;
398
+ let result = Xpub :: from_base58 ( invalid_xpub, CoinType :: BitcoinCash ) ;
399
+ assert ! ( result. is_err( ) , " Short xpub fail for BIP44 Bitcoin Cash" ) ;
400
+ }
393
401
}
394
402
}
You can’t perform that action at this time.
0 commit comments