Skip to content

Commit

Permalink
feat: checkSystemUpgrade by contract
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed Jan 3, 2023
1 parent c8b50d7 commit db847ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions http_server/handle/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ func (h *HttpHandle) checkSystemUpgrade(apiResp *api_code.ApiResp) error {
apiResp.ApiRespErr(api_code.ApiCodeSystemUpgrade, api_code.TextSystemUpgrade)
return fmt.Errorf("contract system upgrade")
}
ok, err := h.DasCore.CheckContractStatusOK(common.DASContractNameSubAccountCellType)
if err != nil {
apiResp.ApiRespErr(api_code.ApiCodeError500, err.Error())
return fmt.Errorf("CheckContractStatusOK err: %s", err.Error())
} else if !ok {
apiResp.ApiRespErr(api_code.ApiCodeSystemUpgrade, api_code.TextSystemUpgrade)
return fmt.Errorf("contract system upgrade")
}
return nil
}

Expand Down

0 comments on commit db847ee

Please sign in to comment.