File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
ouroboros-consensus-cardano/src/shelley/Ouroboros/Consensus/Shelley/Ledger Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,18 @@ instance SL.EraCertState era => LedgerSupportsPeerSelection (ShelleyBlock proto
70
70
(SJust ipv6)
71
71
) =
72
72
Just $ RelayAccessAddress (IPv6 ipv6) (fromIntegral port)
73
+ -- no IP address or no port number
74
+ relayToRelayAccessPoint (SL. SingleHostAddr SNothing _ _) = Nothing
75
+ relayToRelayAccessPoint (SL. SingleHostAddr _ SNothing _) = Nothing
73
76
relayToRelayAccessPoint (SL. SingleHostName (SJust (Port port)) dnsName) =
74
77
Just $ RelayAccessDomain (encodeUtf8 $ dnsToText dnsName) (fromIntegral port)
75
- relayToRelayAccessPoint _ =
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
+
81
+ relayToRelayAccessPoint (SL. SingleHostName SNothing dnsName) =
82
+ Just $ RelayAccessSRVDomain (encodeUtf8 $ dnsToText dnsName)
83
+ relayToRelayAccessPoint (SL. MultiHostName dnsName) =
84
+ Just $ RelayAccessSRVDomain (encodeUtf8 $ dnsToText dnsName)
79
85
80
86
-- \| Note that a stake pool can have multiple registered relays
81
87
pparamsRelayAccessPoints ::
You can’t perform that action at this time.
0 commit comments