mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Merge branch 'develop' of https://github.com/yggdrasil-network/yggdrasil-go into yggdrasil-v0.4.7-develop
This commit is contained in:
commit
35cc180647
20 changed files with 309 additions and 178 deletions
|
@ -17,9 +17,12 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/RiV-chain/RiV-mesh/src/core"
|
||||
"github.com/gologme/log"
|
||||
|
||||
c "github.com/RiV-chain/RiV-mesh/src/core"
|
||||
)
|
||||
|
||||
type keySet struct {
|
||||
|
@ -41,6 +44,8 @@ func main() {
|
|||
fmt.Println("-----")
|
||||
fmt.Println("Priv:", hex.EncodeToString(newKey.priv))
|
||||
fmt.Println("Pub:", hex.EncodeToString(newKey.pub))
|
||||
logger := log.New(os.Stdout, "", log.Flags())
|
||||
core, _ := c.New(newKey.priv, logger, nil)
|
||||
addr := core.AddrForKey(newKey.pub)
|
||||
fmt.Println("IP:", net.IP(addr[:]).String())
|
||||
}
|
||||
|
|
|
@ -253,7 +253,12 @@ func run(args yggArgs, ctx context.Context) {
|
|||
return
|
||||
default:
|
||||
// No flags were provided, therefore print the list of flags to stdout.
|
||||
fmt.Println("Usage:")
|
||||
flag.PrintDefaults()
|
||||
|
||||
if args.getaddr || args.getsnet {
|
||||
fmt.Println("\nError: You need to specify some config data using -useconf or -useconffile.")
|
||||
}
|
||||
}
|
||||
// Have we got a working configuration? If we don't then it probably means
|
||||
// that neither -autoconf, -useconf or -useconffile were set above. Stop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue