aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-12 21:51:05 +0800
committerobscuren <geffobscura@gmail.com>2015-03-12 21:51:05 +0800
commit26a563642431806486b595f29e22ae833abb6a8c (patch)
tree3dfe8ab6581a01317dd4e37a88aacf3551535551 /ethutil
parent4418e4ea6a9b8d648bcb7e7241b887cbab6936bc (diff)
parent3b3843e158d9ddbe76dcfa1e78977f0bd99a9142 (diff)
downloadgo-tangerine-26a563642431806486b595f29e22ae833abb6a8c.tar
go-tangerine-26a563642431806486b595f29e22ae833abb6a8c.tar.gz
go-tangerine-26a563642431806486b595f29e22ae833abb6a8c.tar.bz2
go-tangerine-26a563642431806486b595f29e22ae833abb6a8c.tar.lz
go-tangerine-26a563642431806486b595f29e22ae833abb6a8c.tar.xz
go-tangerine-26a563642431806486b595f29e22ae833abb6a8c.tar.zst
go-tangerine-26a563642431806486b595f29e22ae833abb6a8c.zip
Merge branch 'develop' into rpcfrontier
Diffstat (limited to 'ethutil')
-rw-r--r--ethutil/common.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index 9b66763b8..3ade7fd16 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -13,6 +13,13 @@ import (
"github.com/kardianos/osext"
)
+// MakeName creates a node name that follows the ethereum convention
+// for such names. It adds the operation system name and Go runtime version
+// the name.
+func MakeName(name, version string) string {
+ return fmt.Sprintf("%s/v%s/%s/%s", name, version, runtime.GOOS, runtime.Version())
+}
+
func DefaultAssetPath() string {
var assetPath string
pwd, _ := os.Getwd()