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
+3 -3
View File
@@ -75,7 +75,7 @@ func RegisterRoute(e *echo.Echo) {
formParams, err := ctx.FormParams()
if err != nil && ctx.Request().Method == http.MethodPost {
return comm.Ctrl.FailJson(ctx, fmt.Errorf("invalid epay form params: %w", err))
return comm.Ctrl.FailJson(ctx, constant.ParamsMarshalErr)
}
if err == nil {
copyParams(formParams)
@@ -132,7 +132,7 @@ func RegisterRoute(e *echo.Echo) {
amountFloat, err := strconv.ParseFloat(money, 64)
if err != nil {
return comm.Ctrl.FailJson(ctx, fmt.Errorf("invalid money value: %s", money))
return comm.Ctrl.FailJson(ctx, constant.PayAmountErr)
}
body := map[string]interface{}{
@@ -154,7 +154,7 @@ func RegisterRoute(e *echo.Echo) {
jsonBytes, err := json.Marshal(body)
if err != nil {
return comm.Ctrl.FailJson(ctx, err)
return comm.Ctrl.FailJson(ctx, constant.SystemErr)
}
ctx.Request().Body = io.NopCloser(bytes.NewBuffer(jsonBytes))