MessageRouter mostly route different message type-based to the related message handler
| 35 | // MessageRouter mostly route different message type-based to the |
| 36 | // related message handler |
| 37 | type MessageRouter struct { |
| 38 | msgHandlers map[string]MessageHandler // Msg handler mapped to msg type |
| 39 | RecvChan chan *types.MsgPayload // The channel to handle sync msg |
| 40 | stopRecvCh chan bool // To stop sync channel |
| 41 | p2p p2p.P2P // Refer to the p2p network |
| 42 | pid *actor.PID // P2P actor |
| 43 | } |
| 44 | |
| 45 | // NewMsgRouter returns a message router object |
| 46 | func NewMsgRouter(p2p p2p.P2P) *MessageRouter { |
nothing calls this directly
no outgoing calls
no test coverage detected