(contractAddrs map[string]bool, txHash string, errcode int64, action string, result interface{})
| 92 | } |
| 93 | |
| 94 | func pushEvent(contractAddrs map[string]bool, txHash string, errcode int64, action string, result interface{}) { |
| 95 | if ws != nil { |
| 96 | resp := rest.ResponsePack(Err.SUCCESS) |
| 97 | resp["Result"] = result |
| 98 | resp["Error"] = errcode |
| 99 | resp["Action"] = action |
| 100 | resp["Desc"] = Err.ErrMap[resp["Error"].(int64)] |
| 101 | ws.PushTxResult(contractAddrs, txHash, resp) |
| 102 | ws.BroadcastToSubscribers(contractAddrs, websocket.WSTOPIC_EVENT, resp) |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | func pushBlock(v interface{}) { |
| 107 | if ws == nil { |
no test coverage detected