Skip to content

Commit

Permalink
Little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Potekhin committed Jan 23, 2018
1 parent 4e92ada commit 258b612
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/api/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
)

func TestGetMaxBlockID(t *testing.T) {
var ret getMaxBlockIDResult
var ret GetMaxBlockIDResult
err := sendGet(`maxblockid`, nil, &ret)
assert.NoError(t, err)
}

func TestGetBlockInfo(t *testing.T) {
var ret getBlockInfoResult
var ret GetBlockInfoResult
err := sendGet(`block/1`, nil, &ret)
assert.NoError(t, err)
}
6 changes: 5 additions & 1 deletion tools/desync_monitor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ func monitor(conf *config.Config) {
hash2Node[rollbacksHash] = append(hash2Node[rollbacksHash], node)
}
if len(hash2Node) > 1 {
sendEmail(&conf.Smtp, &conf.AlertMessage, fmt.Sprintf("nodes unsynced. Rollback hashes are: %s", hash2Node))
hash2NodeStrResults := []string{}
for k, v := range hash2Node {
hash2NodeStrResults = append(hash2NodeStrResults, fmt.Sprintf("%x: %s", k, v))
}
sendEmail(&conf.Smtp, &conf.AlertMessage, fmt.Sprintf("nodes unsynced. Rollback hashes are: %s", strings.Join(hash2NodeStrResults, ",")))
}
}

Expand Down

0 comments on commit 258b612

Please sign in to comment.