mirror of
https://github.com/LBRYFoundation/herald.go.git
synced 2025-08-23 17:47:27 +00:00
Run gofmt
This commit is contained in:
parent
0a1ba43d66
commit
72ea236d86
8 changed files with 150 additions and 158 deletions
|
@ -31,4 +31,3 @@ var (
|
|||
Help: "Number of peers that are subscribed to us.",
|
||||
})
|
||||
)
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ type Args struct {
|
|||
StartPrometheus bool
|
||||
StartUDP bool
|
||||
WritePeers bool
|
||||
DisableFederation bool
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
|
@ -32,7 +32,6 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
|
||||
// peerKey takes a ServerMessage object and returns the key that for that peer
|
||||
// in our peer table.
|
||||
func peerKey(msg *pb.ServerMessage) string {
|
||||
|
@ -117,7 +116,6 @@ retry:
|
|||
}
|
||||
cancel()
|
||||
|
||||
|
||||
f, err := os.Open(peerFile)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
|
|
@ -188,7 +188,6 @@ func TestAddPeerEndpoint(t *testing.T) {
|
|||
args2 := makeDefaultArgs()
|
||||
args2.Port = "50052"
|
||||
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
wantServerOne int64
|
||||
|
@ -262,7 +261,6 @@ func TestAddPeerEndpoint2(t *testing.T) {
|
|||
args2.Port = "50052"
|
||||
args3.Port = "50053"
|
||||
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
wantServerOne int64
|
||||
|
@ -335,7 +333,6 @@ func TestAddPeerEndpoint2(t *testing.T) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
// TestAddPeerEndpoint3 tests the ability to add peers
|
||||
func TestAddPeerEndpoint3(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
@ -345,7 +342,6 @@ func TestAddPeerEndpoint3(t *testing.T) {
|
|||
args2.Port = "50052"
|
||||
args3.Port = "50053"
|
||||
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
wantServerOne int64
|
||||
|
@ -426,7 +422,6 @@ func TestAddPeerEndpoint3(t *testing.T) {
|
|||
|
||||
}
|
||||
|
||||
|
||||
// TestAddPeer tests the ability to add peers
|
||||
func TestUDPServer(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
|
|
@ -967,4 +967,3 @@ func removeBlocked(searchHits []*record) ([]*record, []*record, map[string]*pb.B
|
|||
|
||||
return newHits, blockedHits, blockedChannels
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ type Server struct {
|
|||
pb.UnimplementedHubServer
|
||||
}
|
||||
|
||||
|
||||
func getVersion() string {
|
||||
return meta.Version
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import (
|
|||
)
|
||||
|
||||
const maxBufferSize = 1024
|
||||
|
||||
// genesis blocktime (which is actually wrong)
|
||||
const magic = 1446058291
|
||||
const protocolVersion = 1
|
||||
|
|
Loading…
Add table
Reference in a new issue