mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	Fix merge conflicts with endpoints branch
This commit is contained in:
		
						commit
						20c4b7027a
					
				
					 2 changed files with 3 additions and 9 deletions
				
			
		| 
						 | 
					@ -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, "(simulator)")
 | 
						c.init(bpub, bpriv, spub, spriv, metadata{})
 | 
				
			||||||
	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, "(simulator)", "(simulator)") //, in, out)
 | 
						return ps.newPeer(&box, &sig, &link, "(simulator)", metadata{}) //, 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, "(simulator)")
 | 
						c.init(&boxPub, &boxPriv, &sigPub, &sigPriv, metadata{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err := c.router.start(); err != nil {
 | 
						if err := c.router.start(); err != nil {
 | 
				
			||||||
		panic(err)
 | 
							panic(err)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -155,12 +155,6 @@ func main() {
 | 
				
			||||||
							minutes := uint(preformatted.(float64)/60) % 60
 | 
												minutes := uint(preformatted.(float64)/60) % 60
 | 
				
			||||||
							hours := uint(preformatted.(float64) / 60 / 60)
 | 
												hours := uint(preformatted.(float64) / 60 / 60)
 | 
				
			||||||
							formatted = fmt.Sprintf("%02d:%02d:%02d", hours, minutes, seconds)
 | 
												formatted = fmt.Sprintf("%02d:%02d:%02d", hours, minutes, seconds)
 | 
				
			||||||
						case "friendly_name":
 | 
					 | 
				
			||||||
							if len(preformatted.(string)) > 32 {
 | 
					 | 
				
			||||||
								formatted = fmt.Sprintf("%s...", preformatted.(string)[:32])
 | 
					 | 
				
			||||||
							} else {
 | 
					 | 
				
			||||||
								formatted = preformatted.(string)
 | 
					 | 
				
			||||||
							}
 | 
					 | 
				
			||||||
						default:
 | 
											default:
 | 
				
			||||||
							formatted = fmt.Sprint(preformatted)
 | 
												formatted = fmt.Sprint(preformatted)
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue