Skip to content

Commit 621d6c6

Browse files
committed
actually run lol
1 parent 9edd14a commit 621d6c6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ import "x-bootstrap-node/p2p"
44

55
func main() {
66
p2p.InitP2P()
7+
8+
// wait forever
9+
c := make(chan interface{})
10+
<-c
711
}

p2p/p2p.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"x-bootstrap-node/xutil"
55

66
"github.com/perlin-network/noise"
7+
"github.com/perlin-network/noise/kademlia"
78
)
89

910
var Node *noise.Node = nil
@@ -28,6 +29,9 @@ func InitP2P() {
2829
return nil
2930
})
3031

32+
k := kademlia.New()
33+
Node.Bind(k.Protocol())
34+
3135
if err := Node.Listen(); err != nil {
3236
panic(err)
3337
}

0 commit comments

Comments
 (0)