From 594e5333d6b3e300a1b5b9bf1e975f4193e1acce Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Thu, 31 May 2018 12:22:53 +0200 Subject: [PATCH] Store host name only instead of full domain name in the internal state --- blockbook.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blockbook.go b/blockbook.go index 9a06d856..29ed983f 100644 --- a/blockbook.go +++ b/blockbook.go @@ -6,6 +6,7 @@ import ( "log" "os" "os/signal" + "strings" "sync/atomic" "syscall" "time" @@ -317,6 +318,9 @@ func newInternalState(coin string, d *db.RocksDB) (*common.InternalState, error) if err != nil { glog.Error("get hostname ", err) } else { + if i := strings.IndexByte(name, '.'); i > 0 { + name = name[:i] + } is.Host = name } return is, nil