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
70
70
(SJust ipv6)
71
71
) =
72
72
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
73
76
relayToLedgerRelayAccessPoint (SL. SingleHostName (SJust (Port port)) dnsName) =
74
77
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)
79
84
80
85
-- \| Note that a stake pool can have multiple registered relays
81
86
pparamsLedgerRelayAccessPoints ::
You can’t perform that action at this time.
0 commit comments