diff --git a/Config.go b/Config.go index 7bae66c..1e58a93 100644 --- a/Config.go +++ b/Config.go @@ -132,6 +132,12 @@ func (conf *Config) Init() { switch conf.AgentType { case "btc": conf.sessionFactory = new(SessionFactoryBTC) + case "etc": + fallthrough + case "ethw": + fallthrough + case "etf": + fallthrough case "eth": conf.sessionFactory = new(SessionFactoryETH) default: diff --git a/DownSessionETH.go b/DownSessionETH.go index ee72cd2..803e5e2 100644 --- a/DownSessionETH.go +++ b/DownSessionETH.go @@ -386,14 +386,15 @@ func (down *DownSessionETH) handleRequest() { return } if glog.V(11) { - glog.Info(down.id, "handleRequest: ", string(jsonBytes)) + glog.Info(down.id, "handleRequest: ", string(jsonBytes), ", len=", len(jsonBytes), ", hex=", hex.EncodeToString(jsonBytes)) } rpcData, err := NewJSONRPCLineETH(jsonBytes) // ignore the json decode error if err != nil { - glog.Warning(down.id, "failed to decode JSON from miner: ", err.Error(), "; ", string(jsonBytes)) + glog.Warning(down.id, "failed to decode JSON from miner: ", err.Error(), "; ", string(jsonBytes), ", len=", len(jsonBytes), ", hex=", hex.EncodeToString(jsonBytes)) + continue } down.SendEvent(EventRecvJSONRPCETH{rpcData, jsonBytes})