Skip to content

Commit

Permalink
[FAB-3179] Fix staticcheck issues in sbft package
Browse files Browse the repository at this point in the history
Change-Id: I092537a4772b71e02f191b77b5df1999eb3eec88
Signed-off-by: Kostas Christidis <kostas@christidis.io>
  • Loading branch information
kchristidis committed Apr 21, 2017
1 parent 441b308 commit 9a64721
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion orderer/sbft/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ func Sign(privateKey crypto.PrivateKey, data []byte) []byte {
if err != nil {
panic(err)
}
encsig, err = asn1.Marshal(struct{ R, S *big.Int }{r, s})
encsig, _ = asn1.Marshal(struct{ R, S *big.Int }{r, s})
default:
panic("Unsupported private key type given.")
}
Expand Down
2 changes: 1 addition & 1 deletion orderer/sbft/connection/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func New(addr string, certFile string, keyFile string) (_ *Manager, err error) {
}

c.Cert = &cert
c.Self, err = NewPeerInfo("", cert.Certificate[0])
c.Self, _ = NewPeerInfo("", cert.Certificate[0])

c.tlsConfig = &tls.Config{
Certificates: []tls.Certificate{cert},
Expand Down
8 changes: 4 additions & 4 deletions orderer/sbft/simplebft/newview_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestXsetByz0(t *testing.T) {
},
}

xset, _, ok := s.makeXset(vcs)
_, _, ok := s.makeXset(vcs)
if ok {
t.Error("should not have received an xset")
}
Expand All @@ -131,7 +131,7 @@ func TestXsetByz0(t *testing.T) {
Checkpoint: s.makeBatch(2, []byte("prev"), nil),
})

xset, _, ok = s.makeXset(vcs)
xset, _, ok := s.makeXset(vcs)
if !ok {
t.Error("no xset")
}
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestXsetByz2(t *testing.T) {
},
}

xset, _, ok := s.makeXset(vcs)
_, _, ok := s.makeXset(vcs)
if ok {
t.Error("should not have received an xset")
}
Expand All @@ -176,7 +176,7 @@ func TestXsetByz2(t *testing.T) {
Checkpoint: s.makeBatch(1, []byte("prev"), nil),
})

xset, _, ok = s.makeXset(vcs)
xset, _, ok := s.makeXset(vcs)
if !ok {
t.Error("no xset")
}
Expand Down

0 comments on commit 9a64721

Please sign in to comment.