@@ -427,7 +427,7 @@ pub enum Error {
427427 /// A pk->pk derivation was attempted on a hardened key
428428 CannotDeriveFromHardenedKey ,
429429 /// A secp256k1 error occurred
430- Ecdsa ( secp256k1:: Error ) , // TODO: This is not necessary ECDSA error and should be renamed
430+ Secp256k1 ( secp256k1:: Error ) ,
431431 /// A child number was provided that was out of range
432432 InvalidChildNumber ( u32 ) ,
433433 /// Invalid childnumber format.
@@ -446,7 +446,7 @@ impl fmt::Display for Error {
446446 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
447447 match * self {
448448 Error :: CannotDeriveFromHardenedKey => f. write_str ( "cannot derive hardened key from public key" ) ,
449- Error :: Ecdsa ( ref e) => fmt:: Display :: fmt ( e, f) ,
449+ Error :: Secp256k1 ( ref e) => fmt:: Display :: fmt ( e, f) ,
450450 Error :: InvalidChildNumber ( ref n) => write ! ( f, "child number {} is invalid (not within [0, 2^31 - 1])" , n) ,
451451 Error :: InvalidChildNumberFormat => f. write_str ( "invalid child number format" ) ,
452452 Error :: InvalidDerivationPathFormat => f. write_str ( "invalid derivation path format" ) ,
@@ -459,7 +459,7 @@ impl fmt::Display for Error {
459459
460460impl error:: Error for Error {
461461 fn cause ( & self ) -> Option < & dyn error:: Error > {
462- if let Error :: Ecdsa ( ref e) = * self {
462+ if let Error :: Secp256k1 ( ref e) = * self {
463463 Some ( e)
464464 } else {
465465 None
@@ -471,13 +471,13 @@ impl From<key::Error> for Error {
471471 fn from ( err : key:: Error ) -> Self {
472472 match err {
473473 key:: Error :: Base58 ( e) => Error :: Base58 ( e) ,
474- key:: Error :: Secp256k1 ( e) => Error :: Ecdsa ( e) ,
474+ key:: Error :: Secp256k1 ( e) => Error :: Secp256k1 ( e) ,
475475 }
476476 }
477477}
478478
479479impl From < secp256k1:: Error > for Error {
480- fn from ( e : secp256k1:: Error ) -> Error { Error :: Ecdsa ( e) }
480+ fn from ( e : secp256k1:: Error ) -> Error { Error :: Secp256k1 ( e) }
481481}
482482
483483impl From < base58:: Error > for Error {
0 commit comments