File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed 
ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,17 @@ instance SL.EraCertState era => LedgerSupportsPeerSelection (ShelleyBlock proto
7070          (SJust  ipv6)
7171        ) = 
7272        Just  $  LedgerRelayAccessAddress  (IPv6  ipv6) (fromIntegral  port)
73+     --  no IP address or no port number
74+     relayToLedgerRelayAccessPoint (SL. SingleHostAddr  SNothing  _ _) =  Nothing 
75+     relayToLedgerRelayAccessPoint (SL. SingleHostAddr  _ SNothing  _) =  Nothing 
7376    relayToLedgerRelayAccessPoint (SL. SingleHostName  (SJust  (Port  port)) dnsName) = 
7477      Just  $  LedgerRelayAccessDomain  (encodeUtf8 $  dnsToText dnsName) (fromIntegral  port)
75-     relayToLedgerRelayAccessPoint _ = 
76-       --  This could be an unsupported relay (SRV records) or an unusable
77-       --  relay such as a relay with an IP address but without a port number.
78-       Nothing 
78+     --  srv support: either `SingleHostName` without port number or
79+     --  `MultiHostName`
80+     relayToLedgerRelayAccessPoint (SL. SingleHostName  SNothing  dnsName) = 
81+       Just  $  LedgerRelayAccessSRVDomain  (encodeUtf8 $  dnsToText dnsName)
82+     relayToLedgerRelayAccessPoint (SL. MultiHostName  dnsName) = 
83+       Just  $  LedgerRelayAccessSRVDomain  (encodeUtf8 $  dnsToText dnsName)
7984
8085    --  \| Note that a stake pool can have multiple registered relays
8186    pparamsLedgerRelayAccessPoints  :: 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments