diff --git a/changelog/pmikolajczyk-nit-4652.md b/changelog/pmikolajczyk-nit-4652.md new file mode 100644 index 00000000000..c45aa52816f --- /dev/null +++ b/changelog/pmikolajczyk-nit-4652.md @@ -0,0 +1,2 @@ +### Changed +- Enable http communication between block validator and validation server diff --git a/staker/block_validator.go b/staker/block_validator.go index fb0f3c752a2..56755895570 100644 --- a/staker/block_validator.go +++ b/staker/block_validator.go @@ -10,6 +10,7 @@ import ( "fmt" "net/url" "regexp" + "slices" "sync" "sync/atomic" "testing" @@ -203,8 +204,8 @@ func (c *BlockValidatorConfig) Validate() error { if err != nil { return fmt.Errorf("failed parsing validation server's url:%s err: %w", serverUrl, err) } - if u.Scheme != "ws" && u.Scheme != "wss" { - return fmt.Errorf("validation server's url scheme is unsupported, it should either be ws or wss, url:%s", serverUrl) + if !slices.Contains([]string{"ws", "wss", "http", "https"}, u.Scheme) { + return fmt.Errorf("validation server's url scheme is unsupported, it should be ws, wss, http, or https, url:%s", serverUrl) } } }