Commit f62fba7e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 62f2f357
...@@ -95,7 +95,7 @@ type Master struct { ...@@ -95,7 +95,7 @@ type Master struct {
ctlShutdown chan chan error // request to shutdown cluster XXX with ctx ? ctlShutdown chan chan error // request to shutdown cluster XXX with ctx ?
// so tests could override // so tests could override
xtimeMono func() float64 monotime func() float64
} }
// nodeCome represents "node connects" event. // nodeCome represents "node connects" event.
...@@ -165,7 +165,7 @@ func NewMaster(clusterName string, net xnet.Networker) *Master { ...@@ -165,7 +165,7 @@ func NewMaster(clusterName string, net xnet.Networker) *Master {
nodeComeq: make(chan nodeCome), nodeComeq: make(chan nodeCome),
nodeLeaveq: make(chan nodeLeave), nodeLeaveq: make(chan nodeLeave),
xtimeMono: xtime.Mono, monotime: xtime.Mono,
} }
return m return m
...@@ -1276,7 +1276,7 @@ func (m *Master) identify(ctx context.Context, n nodeCome) (peer *_MasteredPeer, ...@@ -1276,7 +1276,7 @@ func (m *Master) identify(ctx context.Context, n nodeCome) (peer *_MasteredPeer,
Addr: n.idReq.Address, Addr: n.idReq.Address,
NID: nid, NID: nid,
State: nodeState, State: nodeState,
IdTime: proto.IdTime(m.xtimeMono()), IdTime: proto.IdTime(m.monotime()),
} }
node := m.updateNodeTab(ctx, nodeInfo) node := m.updateNodeTab(ctx, nodeInfo)
......
...@@ -22,13 +22,13 @@ package neo ...@@ -22,13 +22,13 @@ package neo
// XXX kill? // XXX kill?
import ( import (
"context" // "context"
// "fmt" // "fmt"
// "net" // "net"
// "sync" // "sync"
"lab.nexedi.com/kirr/neo/go/neo/neonet" // "lab.nexedi.com/kirr/neo/go/neo/neonet"
"lab.nexedi.com/kirr/neo/go/neo/proto" // "lab.nexedi.com/kirr/neo/go/neo/proto"
// "lab.nexedi.com/kirr/neo/go/internal/log" // "lab.nexedi.com/kirr/neo/go/internal/log"
// "lab.nexedi.com/kirr/go123/xerr" // "lab.nexedi.com/kirr/go123/xerr"
...@@ -89,7 +89,6 @@ func goreject(ctx context.Context, wg *sync.WaitGroup, req *neonet.Request, resp ...@@ -89,7 +89,6 @@ func goreject(ctx context.Context, wg *sync.WaitGroup, req *neonet.Request, resp
defer wg.Done() defer wg.Done()
go reject(ctx, req, resp) go reject(ctx, req, resp)
} }
*/
// accept replies with acceptive identification response // accept replies with acceptive identification response
// XXX spawn ping goroutine from here? // XXX spawn ping goroutine from here?
...@@ -97,3 +96,4 @@ func accept(ctx context.Context, req *neonet.Request, resp proto.Msg) error { ...@@ -97,3 +96,4 @@ func accept(ctx context.Context, req *neonet.Request, resp proto.Msg) error {
return req.Reply(resp) return req.Reply(resp)
// XXX req.Close() ? // XXX req.Close() ?
} }
*/
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