mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 06:05:06 +03:00
work-in-progress on a new sim
This commit is contained in:
parent
78b5f88e4b
commit
9c818c6278
5 changed files with 168 additions and 1 deletions
23
cmd/yggdrasilsim/node.go
Normal file
23
cmd/yggdrasilsim/node.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"github.com/gologme/log"
|
||||
|
||||
//"github.com/yggdrasil-network/yggdrasil-go/src/address"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/config"
|
||||
//"github.com/yggdrasil-network/yggdrasil-go/src/crypto"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/yggdrasil"
|
||||
)
|
||||
|
||||
type simNode struct {
|
||||
core yggdrasil.Core
|
||||
id int
|
||||
}
|
||||
|
||||
func newNode(id int) *simNode {
|
||||
n := simNode{id: id}
|
||||
n.core.Start(config.GenerateConfig(), log.New(ioutil.Discard, "", 0))
|
||||
return &n
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue