5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-14 04:30:32 +00:00

Fix debug builds with friendly names

This commit is contained in:
Neil Alexander 2018-10-21 18:04:02 +01:00
parent b809adf981
commit 088d28a93b
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -50,7 +50,7 @@ func StartProfiler(log *log.Logger) error {
func (c *Core) Init() { func (c *Core) Init() {
bpub, bpriv := newBoxKeys() bpub, bpriv := newBoxKeys()
spub, spriv := newSigKeys() spub, spriv := newSigKeys()
c.init(bpub, bpriv, spub, spriv) c.init(bpub, bpriv, spub, spriv, "(simulator)")
c.switchTable.start() c.switchTable.start()
c.router.start() c.router.start()
} }
@ -84,7 +84,7 @@ func (c *Core) DEBUG_getPeers() *peers {
func (ps *peers) DEBUG_newPeer(box boxPubKey, sig sigPubKey, link boxSharedKey) *peer { func (ps *peers) DEBUG_newPeer(box boxPubKey, sig sigPubKey, link boxSharedKey) *peer {
//in <-chan []byte, //in <-chan []byte,
//out chan<- []byte) *peer { //out chan<- []byte) *peer {
return ps.newPeer(&box, &sig, &link) //, in, out) return ps.newPeer(&box, &sig, &link, "(simulator)", "(simulator)") //, in, out)
} }
/* /*
@ -358,7 +358,7 @@ func (c *Core) DEBUG_init(bpub []byte,
copy(boxPriv[:], bpriv) copy(boxPriv[:], bpriv)
copy(sigPub[:], spub) copy(sigPub[:], spub)
copy(sigPriv[:], spriv) copy(sigPriv[:], spriv)
c.init(&boxPub, &boxPriv, &sigPub, &sigPriv) c.init(&boxPub, &boxPriv, &sigPub, &sigPriv, "(simulator)")
if err := c.router.start(); err != nil { if err := c.router.start(); err != nil {
panic(err) panic(err)