Run gofmt on server/main.go and common/darkside.go

This commit is contained in:
Taylor Hornby 2020-03-09 20:30:12 -06:00 committed by Larry Ruane
parent d55d9b1c64
commit 673a9635fc
2 changed files with 140 additions and 140 deletions

View File

@ -136,7 +136,7 @@ func main() {
} }
logger.SetLevel(logrus.Level(opts.logLevel)) logger.SetLevel(logrus.Level(opts.logLevel))
filesThatShouldExist := []string{ } filesThatShouldExist := []string{}
if !opts.darkSide { if !opts.darkSide {
filesThatShouldExist = append(filesThatShouldExist, opts.zcashConfPath) filesThatShouldExist = append(filesThatShouldExist, opts.zcashConfPath)

View File

@ -1,13 +1,13 @@
package common package common
import ( import (
"errors"
"encoding/json"
"os"
"bufio" "bufio"
"encoding/hex"
"encoding/json"
"errors"
"os"
"strconv" "strconv"
"time" "time"
"encoding/hex"
) )
type DarksideZcashdState struct { type DarksideZcashdState struct {
@ -86,7 +86,7 @@ func DarkSideRawRequest(method string, params []json.RawMessage) (json.RawMessag
if index < 0 || index > len(state.blocks) { if index < 0 || index > len(state.blocks) {
// If an integration test can reach this, it could be a bug, so generate an error. // If an integration test can reach this, it could be a bug, so generate an error.
Log.Errorf("getblock request made for out-of-range height %d (have %d to %d)", height_i, state.start_height, state.start_height + len(state.blocks) - 1) Log.Errorf("getblock request made for out-of-range height %d (have %d to %d)", height_i, state.start_height, state.start_height+len(state.blocks)-1)
return nil, errors.New("-8:") return nil, errors.New("-8:")
} }
@ -143,7 +143,7 @@ func DarkSideRawRequest(method string, params []json.RawMessage) (json.RawMessag
for i, tx := range state.incoming_transactions { for i, tx := range state.incoming_transactions {
txlist += "\"" + hex.EncodeToString(tx) + "\"" txlist += "\"" + hex.EncodeToString(tx) + "\""
// add commas after all but the last // add commas after all but the last
if i < len(state.incoming_transactions) - 1 { if i < len(state.incoming_transactions)-1 {
txlist += ", " txlist += ", "
} }
} }