fix: typo

Signed-off-by: LesCyber <andi4cing@gmail.com>
This commit is contained in:
LesCyber 2025-03-04 16:45:24 +08:00
parent 351c2cb132
commit 4966062c67

View File

@ -42,7 +42,7 @@ func pingZgChain(rpcUrl string) error {
return err
}
defer res.Body.Close()
if res.StatusCode >= 400 {
if res.StatusCode >= http.StatusBadRequest {
return fmt.Errorf("ping to status failed: %d", res.StatusCode)
}
log.Println("successfully started ZgChain!")
@ -57,7 +57,7 @@ func pingEvm(evmRpcUrl string) error {
}
defer res.Body.Close()
// when running, it should respond 405 to a GET request
if res.StatusCode != 405 {
if res.StatusCode != http.StatusMethodNotAllowed {
return fmt.Errorf("ping to evm failed: %d", res.StatusCode)
}
log.Println("successfully pinged EVM!")