@@ -925,6 +925,14 @@ func (cfg *RocketPoolConfig) ConsensusClientApiUrl() (string, error) {
925925 return cCfg .(config.ExternalConsensusConfig ).GetApiUrl (), nil
926926}
927927
928+ func stripScheme (url string ) string {
929+ idx := strings .Index (url , "://" )
930+ if idx != - 1 {
931+ url = url [idx + 3 :]
932+ }
933+ return url
934+ }
935+
928936// Used by text/template to format validator.yml
929937func (cfg * RocketPoolConfig ) ConsensusClientRpcUrl () (string , error ) {
930938 // Check if Rescue Node is in-use
@@ -947,8 +955,8 @@ func (cfg *RocketPoolConfig) ConsensusClientRpcUrl() (string, error) {
947955 return fmt .Sprintf ("%s:%d" , Eth2ContainerName , cfg .Prysm .RpcPort .Value ), nil
948956 }
949957
950- // Use the external RPC endpoint
951- return cfg .ExternalPrysm .JsonRpcUrl .Value .(string ), nil
958+ // Use the external RPC endpoint, but strip any scheme
959+ return stripScheme ( cfg .ExternalPrysm .JsonRpcUrl .Value .(string ) ), nil
952960}
953961
954962// Used by text/template to format validator.yml
@@ -976,7 +984,7 @@ func (cfg *RocketPoolConfig) FallbackCcRpcUrl() string {
976984 return ""
977985 }
978986
979- return cfg .FallbackPrysm .JsonRpcUrl .Value .(string )
987+ return stripScheme ( cfg .FallbackPrysm .JsonRpcUrl .Value .(string ) )
980988}
981989
982990// Used by text/template to format validator.yml
0 commit comments