(v interface{})
| 70 | } |
| 71 | |
| 72 | func pushSmartCodeEvent(v interface{}) { |
| 73 | if ws == nil { |
| 74 | return |
| 75 | } |
| 76 | rs, ok := v.(types.SmartCodeEvent) |
| 77 | if !ok { |
| 78 | log.Errorf("[PushSmartCodeEvent]", "SmartCodeEvent err") |
| 79 | return |
| 80 | } |
| 81 | go func() { |
| 82 | switch object := rs.Result.(type) { |
| 83 | case *event.LogEventArgs: |
| 84 | contractAddrs, evts := bcomn.GetLogEvent(object) |
| 85 | pushEvent(contractAddrs, rs.TxHash.ToHexString(), rs.Error, rs.Action, evts) |
| 86 | case *event.ExecuteNotify: |
| 87 | contractAddrs, notify := bcomn.GetExecuteNotify(object) |
| 88 | pushEvent(contractAddrs, rs.TxHash.ToHexString(), rs.Error, rs.Action, notify) |
| 89 | default: |
| 90 | } |
| 91 | }() |
| 92 | } |
| 93 | |
| 94 | func pushEvent(contractAddrs map[string]bool, txHash string, errcode int64, action string, result interface{}) { |
| 95 | if ws != nil { |
nothing calls this directly
no test coverage detected