aboutsummaryrefslogtreecommitdiffstats
path: root/ethstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-01-06 22:52:03 +0800
committerFelix Lange <fjl@twurst.com>2017-01-06 22:52:03 +0800
commit35a7dcb162546f7f31cb6492f716cb93159218d7 (patch)
tree4828026948031719a703a87e0ce909e82da21d3b /ethstats
parente0fde022909d272e55fb9ea2d4f8cfe9f178dba8 (diff)
downloaddexon-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.gz
dexon-35a7dcb162546f7f31cb6492f716cb93159218d7.tar.zst
dexon-35a7dcb162546f7f31cb6492f716cb93159218d7.zip
all: gofmt -w -s
Diffstat (limited to 'ethstats')
-rw-r--r--ethstats/ethstats.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go
index 716beef69..b802d347f 100644
--- a/ethstats/ethstats.go
+++ b/ethstats/ethstats.go
@@ -326,7 +326,7 @@ func (s *Service) login(in *json.Decoder, out *json.Encoder) error {
Secret: s.pass,
}
login := map[string][]interface{}{
- "emit": []interface{}{"hello", auth},
+ "emit": {"hello", auth},
}
if err := out.Encode(login); err != nil {
return err
@@ -365,7 +365,7 @@ func (s *Service) reportLatency(out *json.Encoder) error {
start := time.Now()
ping := map[string][]interface{}{
- "emit": []interface{}{"node-ping", map[string]string{
+ "emit": {"node-ping", map[string]string{
"id": s.node,
"clientTime": start.String(),
}},
@@ -383,7 +383,7 @@ func (s *Service) reportLatency(out *json.Encoder) error {
}
// Send back the measured latency
latency := map[string][]interface{}{
- "emit": []interface{}{"latency", map[string]string{
+ "emit": {"latency", map[string]string{
"id": s.node,
"latency": strconv.Itoa(int((time.Since(start) / time.Duration(2)).Nanoseconds() / 1000000)),
}},
@@ -438,7 +438,7 @@ func (s *Service) reportBlock(out *json.Encoder, block *types.Block) error {
"block": s.assembleBlockStats(block),
}
report := map[string][]interface{}{
- "emit": []interface{}{"block", stats},
+ "emit": {"block", stats},
}
if err := out.Encode(report); err != nil {
return err
@@ -531,7 +531,7 @@ func (s *Service) reportHistory(out *json.Encoder, list []uint64) error {
"history": history,
}
report := map[string][]interface{}{
- "emit": []interface{}{"history", stats},
+ "emit": {"history", stats},
}
if err := out.Encode(report); err != nil {
return err
@@ -562,7 +562,7 @@ func (s *Service) reportPending(out *json.Encoder) error {
},
}
report := map[string][]interface{}{
- "emit": []interface{}{"pending", stats},
+ "emit": {"pending", stats},
}
if err := out.Encode(report); err != nil {
return err
@@ -616,7 +616,7 @@ func (s *Service) reportStats(out *json.Encoder) error {
},
}
report := map[string][]interface{}{
- "emit": []interface{}{"stats", stats},
+ "emit": {"stats", stats},
}
if err := out.Encode(report); err != nil {
return err