Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
The CI validation is now enforcing linting and all builds on master are
now failing.  This changeset fixes the errors out of make linter.

Change-Id: I696f3f3d6167820442f66dd20e01012c86cc9800
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Nov 9, 2016
1 parent e4b141a commit 845b30e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
5 changes: 3 additions & 2 deletions orderer/sample_clients/single_tx_client/single_tx_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ package main

import (
"fmt"
"time"

"github.com/golang/protobuf/proto"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
"github.com/op/go-logging"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
"time"
)

var logger = logging.MustGetLogger("sbft_test")
Expand Down
14 changes: 7 additions & 7 deletions orderer/sbft/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ import (
"encoding/asn1"

"github.com/golang/protobuf/proto"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
s "github.com/hyperledger/fabric/consensus/simplebft"
"github.com/hyperledger/fabric/orderer/rawledger"
"github.com/hyperledger/fabric/orderer/sbft/connection"
"github.com/hyperledger/fabric/orderer/sbft/persist"
s "github.com/hyperledger/fabric/consensus/simplebft"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
"github.com/op/go-logging"
"github.com/hyperledger/fabric/orderer/rawledger"
)

var logger = logging.MustGetLogger("backend")
Expand All @@ -63,7 +63,7 @@ type Backend struct {
queue chan Executable

persistence *persist.Persist
ledger rawledger.ReadWriter
ledger rawledger.ReadWriter
}

type consensusConn Backend
Expand Down Expand Up @@ -92,7 +92,7 @@ func NewBackend(peers map[string][]byte, conn *connection.Manager, rl rawledger.
conn: conn,
peers: make(map[uint64]chan<- *s.Msg),
peerInfo: make(map[string]*PeerInfo),
ledger: rl,
ledger: rl,
}

var peerInfo []*PeerInfo
Expand Down Expand Up @@ -191,7 +191,7 @@ func (b *Backend) enqueueRequest(request []byte) {
func (b *Backend) enqueueForReceive(msg *s.Msg, src uint64) {
go func() {
b.queue <- &msgEvent{msg: msg, src: src}
} ()
}()
}

func (b *Backend) initTimer(t *Timer, d time.Duration) {
Expand Down
4 changes: 2 additions & 2 deletions orderer/sbft/backend/backendab.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (b *BackendAB) Broadcast(srv ab.AtomicBroadcast_BroadcastServer) error {
}

if envelope.Payload == nil {
err = srv.Send(&ab.BroadcastResponse{ab.Status_BAD_REQUEST})
err = srv.Send(&ab.BroadcastResponse{Status: ab.Status_BAD_REQUEST})
if err != nil {
return err
}
Expand All @@ -54,7 +54,7 @@ func (b *BackendAB) Broadcast(srv ab.AtomicBroadcast_BroadcastServer) error {
panic(err)
}
b.backend.enqueueRequest(req)
err = srv.Send(&ab.BroadcastResponse{ab.Status_SUCCESS})
err = srv.Send(&ab.BroadcastResponse{Status: ab.Status_SUCCESS})
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion orderer/sbft/backend/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ type connectionEvent struct {
func (c *connectionEvent) Execute(backend *Backend) {
backend.consensus.Connection(c.peerid)
}

2 changes: 1 addition & 1 deletion orderer/sbft/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"os"

pb "github.com/hyperledger/fabric/consensus/simplebft"
ab "github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric/orderer/common/bootstrap/static"
"github.com/hyperledger/fabric/orderer/rawledger/fileledger"
"github.com/hyperledger/fabric/orderer/sbft/backend"
"github.com/hyperledger/fabric/orderer/sbft/connection"
"github.com/hyperledger/fabric/orderer/sbft/persist"
ab "github.com/hyperledger/fabric/protos/orderer"
"github.com/op/go-logging"
"google.golang.org/grpc"
)
Expand Down

0 comments on commit 845b30e

Please sign in to comment.