Commit 0ee8a94f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cab8b455
......@@ -25,8 +25,6 @@ import (
"net"
"sync"
// "lab.nexedi.com/kirr/neo/go/internal/xtracing/tracetest"
"lab.nexedi.com/kirr/neo/go/neo/proto"
)
......@@ -153,13 +151,10 @@ func δnode(where string, laddr string, typ proto.NodeType, num int32, state pro
// EventRouter implements NEO-specific routing of events to trace test channels.
//
// A test has to define routing rules using BranchNode, BranchState and BranchLink XXX
// A test has to define routing rules using BranchNode, BranchState and BranchLink.
type EventRouter struct {
mu sync.Mutex
// // XXX all unbranched events go to here?
// defaultq tracetest.Chan
// events specific to particular node - e.g. node starts listening,
// state on that node changes, etc...
byNode map[string /*host*/]string /*stream*/
......@@ -194,7 +189,6 @@ type linkDst struct {
func NewEventRouter() *EventRouter {
return &EventRouter{
// defaultq: tracetest.NewChan("default"),
byNode: make(map[string]string),
byState: make(map[string]string),
byLink: make(map[string]*linkDst),
......@@ -202,29 +196,6 @@ func NewEventRouter() *EventRouter {
}
}
/*
func (r *EventRouter) AllStreams() []tracetest.Chan {
rtset := map[tracetest.Chan]int{}
rtset[r.defaultq] = 1
for _, dst := range r.byNode {
rtset[dst] = 1
}
for _, dst := range r.byState {
rtset[dst] = 1
}
for _, ldst := range r.byLink {
rtset[ldst.a] = 1
rtset[ldst.b] = 1
}
var rtv []tracetest.Chan
for dst := range rtset {
rtv = append(rtv, dst)
}
return rtv
}
*/
// hostport splits addr of for "host:port" into host and port.
//
// if the address has not the specified form returned are:
......@@ -247,7 +218,6 @@ func host(addr string) string {
}
// Route routes events according to rules specified via Branch*().
//func (r *EventRouter) RouteEvent(event interface{}) (dst tracetest.Chan) {
func (r *EventRouter) RouteEvent(event interface{}) (dst/*stream*/ string) {
r.mu.Lock()
defer r.mu.Unlock()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment