feat: isolate manual verification RPC usage

- add rpc node purpose support for general/manual_verify/both
- keep scan, WSS and health checks away from manual_verify nodes
- fallback manual hash verification from general RPC to manual_verify RPC
- add public cashier hash submission path and errno responses
- update tests for RPC selection, failover and manual payment flows
This commit is contained in:
line-6000
2026-05-27 19:36:56 +08:00
parent 13c81ee560
commit c69b0d6c0c
185 changed files with 2525 additions and 483 deletions
+7 -7
View File
@@ -1,6 +1,7 @@
package http
import (
"errors"
"github.com/GMWalletApp/epusdt/util/constant"
"github.com/GMWalletApp/epusdt/util/page"
"github.com/labstack/echo/v4"
@@ -65,13 +66,12 @@ func (r *Resp) SucJsonPage(e echo.Context, data interface{}, pagination page.Pag
func (r *Resp) FailJson(e echo.Context, err error) error {
rr := new(Response)
httpStatus := http.StatusBadRequest
switch t := err.(type) {
case *constant.RspError:
rr.StatusCode, rr.Message = t.Render()
httpStatus = t.HttpStatus()
default:
rr.StatusCode = http.StatusBadRequest
rr.Message = err.Error()
var rspErr *constant.RspError
if errors.As(err, &rspErr) {
rr.StatusCode, rr.Message = rspErr.Render()
httpStatus = rspErr.HttpStatus()
} else {
rr.StatusCode, rr.Message = constant.ResolveErrno(err)
}
rr.RequestID = e.Request().Header.Get(echo.HeaderXRequestID)
return r.Json(e, httpStatus, &rr)