@@ -745,9 +745,9 @@ impl TryFrom<ExitPointExtV1> for ExitPoint {
745745// Legacy TOML version of config file. 
746746// 
747747
748- #[ derive( Clone ,  Debug ,  Serialize ,   Deserialize ) ]  
748+ #[ derive( Clone ,  Debug ,  Deserialize ) ]  
749749enum  LegacyEntryPoint  { 
750-     Gateway  {  identity :  NodeIdentity  } , 
750+     Gateway  {  identity :  Vec < u8 >  } , 
751751    Location  {  location :  String  } , 
752752    Random , 
753753} 
@@ -757,7 +757,10 @@ impl TryFrom<LegacyEntryPoint> for EntryPoint {
757757
758758    fn  try_from ( value :  LegacyEntryPoint )  -> Result < Self ,  Self :: Error >  { 
759759        match  value { 
760-             LegacyEntryPoint :: Gateway  {  identity }  => Ok ( EntryPoint :: Gateway  {  identity } ) , 
760+             LegacyEntryPoint :: Gateway  {  identity }  => Ok ( EntryPoint :: Gateway  { 
761+                 identity :  NodeIdentity :: from_bytes ( & identity) 
762+                     . map_err ( |e| ConfigSetupError :: EntryPoint ( e. to_string ( ) ) ) ?, 
763+             } ) , 
761764            LegacyEntryPoint :: Location  {  location }  => Ok ( EntryPoint :: Country  { 
762765                two_letter_iso_country_code :  location, 
763766            } ) , 
@@ -766,10 +769,10 @@ impl TryFrom<LegacyEntryPoint> for EntryPoint {
766769    } 
767770} 
768771
769- #[ derive( Clone ,  Debug ,  PartialEq ,  Eq ,  Deserialize ,   Serialize ) ]  
772+ #[ derive( Clone ,  Debug ,  PartialEq ,  Eq ,  Deserialize ) ]  
770773enum  LegacyExitPoint  { 
771774    Address  {  address :  String  } , 
772-     Gateway  {  identity :  NodeIdentity  } , 
775+     Gateway  {  identity :  Vec < u8 >  } , 
773776    Location  {  location :  String  } , 
774777    Random , 
775778} 
@@ -786,7 +789,10 @@ impl TryFrom<LegacyExitPoint> for ExitPoint {
786789                    address :  Box :: new ( recipient) , 
787790                } ) 
788791            } 
789-             LegacyExitPoint :: Gateway  {  identity }  => Ok ( ExitPoint :: Gateway  {  identity } ) , 
792+             LegacyExitPoint :: Gateway  {  identity }  => Ok ( ExitPoint :: Gateway  { 
793+                 identity :  NodeIdentity :: from_bytes ( & identity) 
794+                     . map_err ( |e| ConfigSetupError :: ExitPoint ( e. to_string ( ) ) ) ?, 
795+             } ) , 
790796            LegacyExitPoint :: Location  {  location }  => Ok ( ExitPoint :: Country  { 
791797                two_letter_iso_country_code :  location, 
792798            } ) , 
0 commit comments