Commit 29c7f65e authored by szh's avatar szh

add walletstatus

parent f9e65631
......@@ -23,13 +23,7 @@ type Pai struct {
NetInfo *types.NodeNetInfo `json:"net_info"`
}
var pai_serial string
func (p *Pai) GetConfig() bool {
if pai_serial != "" {
logging.Debug("pai_serial",pai_serial)
p.Serial = pai_serial
}
if p.Serial != "" {
return true
}
......@@ -74,6 +68,12 @@ func (p *Pai) GetDevstatus() error {
return err
}
p.NetInfo = netinfo
walletstatus,err := client.GetWalletStatus()
if err != nil {
logging.Error("GetDevstatus GetWalletStatus err",err)
return err
}
p.WalletStatus = walletstatus
return nil
}
......@@ -108,9 +108,6 @@ func getPaiConfig(command string ,arg ...string) (config map[string]string,err e
//fmt.Println("KEY:",k, "VAL:", v)
if _, ok := list[k]; !ok {
list[k] = v
if k == "serial" {
pai_serial = v
}
}
}
}
......
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