Commit cc1ed4e6 authored by libangzhu's avatar libangzhu

fix test

parent ba502228
...@@ -612,14 +612,14 @@ func (n *Node) monitorCerts() { ...@@ -612,14 +612,14 @@ func (n *Node) monitorCerts() {
log.Error("monitorCerts", "rpc call err", err) log.Error("monitorCerts", "rpc call err", err)
return return
} }
delayT:=time.Now().Add(time.Minute*2) //delayT:=time.Now().Add(time.Minute*2)
for { for {
select { select {
case <-ticker.C: case <-ticker.C:
//check serialNum //check serialNum
if !time.Now().After(delayT){ // if !time.Now().After(delayT){
continue // continue
} // }
var resp []string var resp []string
var s Serial var s Serial
s.Serials =getSerialNums() s.Serials =getSerialNums()
......
...@@ -28,7 +28,7 @@ func TestNetAddress(t *testing.T) { ...@@ -28,7 +28,7 @@ func TestNetAddress(t *testing.T) {
} }
func TestAddrRouteble(t *testing.T) { func TestAddrRouteble(t *testing.T) {
resp := P2pComm.AddrRouteble([]string{"114.55.101.159:13802"}, utils.CalcChannelVersion(119, VERSION), nil) resp := P2pComm.AddrRouteble([]string{"114.55.101.159:13802"}, utils.CalcChannelVersion(119, VERSION), nil,nil)
t.Log(resp) t.Log(resp)
} }
......
...@@ -372,7 +372,7 @@ func testGrpcStreamConns(t *testing.T, p2p *P2p) { ...@@ -372,7 +372,7 @@ func testGrpcStreamConns(t *testing.T, p2p *P2p) {
func testP2pComm(t *testing.T, p2p *P2p) { func testP2pComm(t *testing.T, p2p *P2p) {
addrs := P2pComm.AddrRouteble([]string{"localhost:53802"}, utils.CalcChannelVersion(testChannel, VERSION), nil) addrs := P2pComm.AddrRouteble([]string{"localhost:53802"}, utils.CalcChannelVersion(testChannel, VERSION), nil,nil)
t.Log(addrs) t.Log(addrs)
i32 := P2pComm.BytesToInt32([]byte{0xff}) i32 := P2pComm.BytesToInt32([]byte{0xff})
t.Log(i32) t.Log(i32)
......
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