Skip to content

Commit 845b30e

Browse files
author
Jason Yellick
committed
Fix linting errors
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 <[email protected]>
1 parent e4b141a commit 845b30e

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

orderer/sample_clients/single_tx_client/single_tx_client.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ package main
1818

1919
import (
2020
"fmt"
21+
"time"
22+
23+
"github.com/golang/protobuf/proto"
2124
cb "github.com/hyperledger/fabric/protos/common"
2225
ab "github.com/hyperledger/fabric/protos/orderer"
2326
"github.com/op/go-logging"
24-
"github.com/golang/protobuf/proto"
2527
"golang.org/x/net/context"
2628
"google.golang.org/grpc"
27-
"time"
2829
)
2930

3031
var logger = logging.MustGetLogger("sbft_test")

orderer/sbft/backend/backend.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ import (
3939
"encoding/asn1"
4040

4141
"github.com/golang/protobuf/proto"
42-
cb "github.com/hyperledger/fabric/protos/common"
43-
ab "github.com/hyperledger/fabric/protos/orderer"
42+
s "github.com/hyperledger/fabric/consensus/simplebft"
43+
"github.com/hyperledger/fabric/orderer/rawledger"
4444
"github.com/hyperledger/fabric/orderer/sbft/connection"
4545
"github.com/hyperledger/fabric/orderer/sbft/persist"
46-
s "github.com/hyperledger/fabric/consensus/simplebft"
46+
cb "github.com/hyperledger/fabric/protos/common"
47+
ab "github.com/hyperledger/fabric/protos/orderer"
4748
"github.com/op/go-logging"
48-
"github.com/hyperledger/fabric/orderer/rawledger"
4949
)
5050

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

6565
persistence *persist.Persist
66-
ledger rawledger.ReadWriter
66+
ledger rawledger.ReadWriter
6767
}
6868

6969
type consensusConn Backend
@@ -92,7 +92,7 @@ func NewBackend(peers map[string][]byte, conn *connection.Manager, rl rawledger.
9292
conn: conn,
9393
peers: make(map[uint64]chan<- *s.Msg),
9494
peerInfo: make(map[string]*PeerInfo),
95-
ledger: rl,
95+
ledger: rl,
9696
}
9797

9898
var peerInfo []*PeerInfo
@@ -191,7 +191,7 @@ func (b *Backend) enqueueRequest(request []byte) {
191191
func (b *Backend) enqueueForReceive(msg *s.Msg, src uint64) {
192192
go func() {
193193
b.queue <- &msgEvent{msg: msg, src: src}
194-
} ()
194+
}()
195195
}
196196

197197
func (b *Backend) initTimer(t *Timer, d time.Duration) {

orderer/sbft/backend/backendab.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (b *BackendAB) Broadcast(srv ab.AtomicBroadcast_BroadcastServer) error {
4444
}
4545

4646
if envelope.Payload == nil {
47-
err = srv.Send(&ab.BroadcastResponse{ab.Status_BAD_REQUEST})
47+
err = srv.Send(&ab.BroadcastResponse{Status: ab.Status_BAD_REQUEST})
4848
if err != nil {
4949
return err
5050
}
@@ -54,7 +54,7 @@ func (b *BackendAB) Broadcast(srv ab.AtomicBroadcast_BroadcastServer) error {
5454
panic(err)
5555
}
5656
b.backend.enqueueRequest(req)
57-
err = srv.Send(&ab.BroadcastResponse{ab.Status_SUCCESS})
57+
err = srv.Send(&ab.BroadcastResponse{Status: ab.Status_SUCCESS})
5858
if err != nil {
5959
return err
6060
}

orderer/sbft/backend/events.go

-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ type connectionEvent struct {
6363
func (c *connectionEvent) Execute(backend *Backend) {
6464
backend.consensus.Connection(c.peerid)
6565
}
66-

orderer/sbft/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424
"os"
2525

2626
pb "github.com/hyperledger/fabric/consensus/simplebft"
27-
ab "github.com/hyperledger/fabric/protos/orderer"
2827
"github.com/hyperledger/fabric/orderer/common/bootstrap/static"
2928
"github.com/hyperledger/fabric/orderer/rawledger/fileledger"
3029
"github.com/hyperledger/fabric/orderer/sbft/backend"
3130
"github.com/hyperledger/fabric/orderer/sbft/connection"
3231
"github.com/hyperledger/fabric/orderer/sbft/persist"
32+
ab "github.com/hyperledger/fabric/protos/orderer"
3333
"github.com/op/go-logging"
3434
"google.golang.org/grpc"
3535
)

0 commit comments

Comments
 (0)