MCPcopy Create free account
hub / github.com/DNAProject/DNA / pushEvent

Function pushEvent

http/websocket/server.go:94–104  ·  view source on GitHub ↗
(contractAddrs map[string]bool, txHash string, errcode int64, action string, result interface{})

Source from the content-addressed store, hash-verified

92}
93
94func 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
106func pushBlock(v interface{}) {
107 if ws == nil {

Callers 1

pushSmartCodeEventFunction · 0.70

Calls 3

ResponsePackFunction · 0.92
PushTxResultMethod · 0.80

Tested by

no test coverage detected