diff --git a/http_server/handle/order_change.go b/http_server/handle/order_change.go index 05c4ad2..3053217 100644 --- a/http_server/handle/order_change.go +++ b/http_server/handle/order_change.go @@ -2,7 +2,6 @@ package handle import ( "context" - "das_register_server/cache" "das_register_server/config" "das_register_server/internal" "das_register_server/notify" @@ -115,12 +114,13 @@ func (h *HttpHandle) doOrderChange(ctx context.Context, req *ReqOrderChange, api return fmt.Errorf("sync block number") } - if err := h.rc.RegisterLimitLockWithRedis(req.ChainType, req.Address, "change", req.Account, time.Second*10); err != nil { - if err == cache.ErrDistributedLockPreemption { - apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") - return nil - } - } + log.Info("doOrderChange:", req.Address, req.Account) + //if err := h.rc.RegisterLimitLockWithRedis(req.ChainType, req.Address, "change", req.Account, time.Second*10); err != nil { + // if err == cache.ErrDistributedLockPreemption { + // apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") + // return nil + // } + //} //if exi := h.rc.RegisterLimitExist(req.ChainType, req.Address, req.Account, "2"); exi { // apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") // return fmt.Errorf("AccountActionLimitExist: %d %s %s", req.ChainType, req.Address, req.Account) diff --git a/http_server/handle/order_register.go b/http_server/handle/order_register.go index bd2b468..f581a74 100644 --- a/http_server/handle/order_register.go +++ b/http_server/handle/order_register.go @@ -2,7 +2,6 @@ package handle import ( "context" - "das_register_server/cache" "das_register_server/config" "das_register_server/internal" "das_register_server/notify" @@ -196,12 +195,13 @@ func (h *HttpHandle) doOrderRegister(ctx context.Context, req *ReqOrderRegister, return fmt.Errorf("sync block number") } - if err := h.rc.RegisterLimitLockWithRedis(req.ChainType, req.Address, "register", req.Account, time.Second*10); err != nil { - if err == cache.ErrDistributedLockPreemption { - apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") - return nil - } - } + log.Info("doOrderRegister:", req.Address, req.Account) + //if err := h.rc.RegisterLimitLockWithRedis(req.ChainType, req.Address, "register", req.Account, time.Second*10); err != nil { + // if err == cache.ErrDistributedLockPreemption { + // apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") + // return nil + // } + //} // check un pay maxUnPayCount := int64(200) diff --git a/http_server/handle/order_renew.go b/http_server/handle/order_renew.go index b92627b..5e24b73 100644 --- a/http_server/handle/order_renew.go +++ b/http_server/handle/order_renew.go @@ -115,10 +115,11 @@ func (h *HttpHandle) doOrderRenew(ctx context.Context, req *ReqOrderRenew, apiRe return fmt.Errorf("sync block number") } - if exi := h.rc.AccountLimitExist(req.Account); exi { - apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") - return fmt.Errorf("AccountActionLimitExist: %d %s %s", req.ChainType, req.Address, req.Account) - } + log.Info("doOrderRenew:", req.Address, req.Account) + //if exi := h.rc.AccountLimitExist(req.Account); exi { + // apiResp.ApiRespErr(api_code.ApiCodeOperationFrequent, "the operation is too frequent") + // return fmt.Errorf("AccountActionLimitExist: %d %s %s", req.ChainType, req.Address, req.Account) + //} acc := h.checkRenewOrder(req, apiResp) if apiResp.ErrNo != api_code.ApiCodeSuccess {