From dc7964b5be0682fb8b9301c7a623806eeae03804 Mon Sep 17 00:00:00 2001 From: Artem Barger Date: Wed, 9 Nov 2016 14:59:06 -0500 Subject: [PATCH] [FAB-1056]: Reformat files to comply with goimports Change-Id: Iae90cc3cd410752280e03c345df11c7fa1a9a6e1 Signed-off-by: Artem Barger --- .../single_tx_client/single_tx_client.go | 5 +++-- orderer/sbft/backend/backend.go | 14 +++++++------- orderer/sbft/backend/events.go | 1 - orderer/sbft/main.go | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/orderer/sample_clients/single_tx_client/single_tx_client.go b/orderer/sample_clients/single_tx_client/single_tx_client.go index c388b3f026d..49ce22eb85d 100644 --- a/orderer/sample_clients/single_tx_client/single_tx_client.go +++ b/orderer/sample_clients/single_tx_client/single_tx_client.go @@ -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") diff --git a/orderer/sbft/backend/backend.go b/orderer/sbft/backend/backend.go index e8616e56c14..ea67ac67330 100644 --- a/orderer/sbft/backend/backend.go +++ b/orderer/sbft/backend/backend.go @@ -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") @@ -63,7 +63,7 @@ type Backend struct { queue chan Executable persistence *persist.Persist - ledger rawledger.ReadWriter + ledger rawledger.ReadWriter } type consensusConn Backend @@ -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 @@ -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) { diff --git a/orderer/sbft/backend/events.go b/orderer/sbft/backend/events.go index 3de7a9a11c6..d124b3c3f70 100644 --- a/orderer/sbft/backend/events.go +++ b/orderer/sbft/backend/events.go @@ -63,4 +63,3 @@ type connectionEvent struct { func (c *connectionEvent) Execute(backend *Backend) { backend.consensus.Connection(c.peerid) } - diff --git a/orderer/sbft/main.go b/orderer/sbft/main.go index 3979ca77987..5ec36c0ea26 100644 --- a/orderer/sbft/main.go +++ b/orderer/sbft/main.go @@ -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" )