Commit c0e02825 authored by szh's avatar szh

add reset node log

parent 93bec52d
...@@ -293,10 +293,17 @@ func ResetNode(c* gin.Context){ ...@@ -293,10 +293,17 @@ func ResetNode(c* gin.Context){
return return
} }
os.RemoveAll(fmt.Sprint("%s/datadir",app.Bityuan.Path)) err = os.RemoveAll(fmt.Sprint("%s/datadir",app.Bityuan.Path))
if err != nil {
app.BityuanFlag = false
tlog.Error("ResetNode","remove datadir err",err)
appG.Response(http.StatusOK, e.RM_ERROR,"remove datadir err")
return
}
err=app.StartProcess(setting.Chain33Pai.Auto) err=app.StartProcess(setting.Chain33Pai.Auto)
if err != nil { if err != nil {
tlog.Error("ResetNode","start node err",err)
app.BityuanFlag = false app.BityuanFlag = false
appG.Response(http.StatusOK, e.NODE_ERROR,"start auto sh err") appG.Response(http.StatusOK, e.NODE_ERROR,"start auto sh err")
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment