mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Move Init from core.go to debug.go as function is only for simulator
This commit is contained in:
		
							parent
							
								
									460a22c063
								
							
						
					
					
						commit
						ccf71af6b7
					
				
					 2 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
					@ -32,14 +32,6 @@ type Core struct {
 | 
				
			||||||
	ifceExpr    []*regexp.Regexp // the zone of link-local IPv6 peers must match this
 | 
						ifceExpr    []*regexp.Regexp // the zone of link-local IPv6 peers must match this
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// This function is only called by the simulator to set up a node with random
 | 
					 | 
				
			||||||
// keys. It should not be used and may be removed in the future.
 | 
					 | 
				
			||||||
func (c *Core) Init() {
 | 
					 | 
				
			||||||
	bpub, bpriv := newBoxKeys()
 | 
					 | 
				
			||||||
	spub, spriv := newSigKeys()
 | 
					 | 
				
			||||||
	c.init(bpub, bpriv, spub, spriv)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (c *Core) init(bpub *boxPubKey,
 | 
					func (c *Core) init(bpub *boxPubKey,
 | 
				
			||||||
	bpriv *boxPrivKey,
 | 
						bpriv *boxPrivKey,
 | 
				
			||||||
	spub *sigPubKey,
 | 
						spub *sigPubKey,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,6 +29,14 @@ func StartProfiler(log *log.Logger) error {
 | 
				
			||||||
	return nil
 | 
						return nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This function is only called by the simulator to set up a node with random
 | 
				
			||||||
 | 
					// keys. It should not be used and may be removed in the future.
 | 
				
			||||||
 | 
					func (c *Core) Init() {
 | 
				
			||||||
 | 
						bpub, bpriv := newBoxKeys()
 | 
				
			||||||
 | 
						spub, spriv := newSigKeys()
 | 
				
			||||||
 | 
						c.init(bpub, bpriv, spub, spriv)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
////////////////////////////////////////////////////////////////////////////////
 | 
					////////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Core
 | 
					// Core
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue