diff --git a/orderer/common/deliver/deliver.go b/orderer/common/deliver/deliver.go index 631be82530c..d2af6a135f9 100644 --- a/orderer/common/deliver/deliver.go +++ b/orderer/common/deliver/deliver.go @@ -83,7 +83,7 @@ func (ds *deliverServer) Handle(srv ab.AtomicBroadcast_DeliverServer) error { } if payload.Header == nil /* || payload.Header.ChannelHeader == nil */ { - err := fmt.Errorf("Malformed envelope recieved with bad header") + err = fmt.Errorf("Malformed envelope received with bad header") logger.Error(err) return err } diff --git a/orderer/common/deliver/deliver_test.go b/orderer/common/deliver/deliver_test.go index 5301dccef78..0dc19f02373 100644 --- a/orderer/common/deliver/deliver_test.go +++ b/orderer/common/deliver/deliver_test.go @@ -166,10 +166,9 @@ func TestOldestSeek(t *testing.T) { t.Fatalf("Expected %d blocks but got %d", ledgerSize, count) } return - } else { - if deliverReply.GetBlock().Header.Number != count { - t.Fatalf("Expected block %d but got block %d", count, deliverReply.GetBlock().Header.Number) - } + } + if deliverReply.GetBlock().Header.Number != count { + t.Fatalf("Expected block %d but got block %d", count, deliverReply.GetBlock().Header.Number) } case <-time.After(time.Second): t.Fatalf("Timed out waiting to get all blocks") @@ -200,10 +199,9 @@ func TestNewestSeek(t *testing.T) { t.Fatalf("Received an error on the reply channel") } return - } else { - if deliverReply.GetBlock().Header.Number != uint64(ledgerSize-1) { - t.Fatalf("Expected only the most recent block") - } + } + if deliverReply.GetBlock().Header.Number != uint64(ledgerSize-1) { + t.Fatalf("Expected only the most recent block") } case <-time.After(time.Second): t.Fatalf("Timed out waiting to get all blocks") @@ -236,10 +234,9 @@ func TestSpecificSeek(t *testing.T) { t.Fatalf("Received an error on the reply channel") } return - } else { - if expected := specifiedStart + count; deliverReply.GetBlock().Header.Number != expected { - t.Fatalf("Expected block %d but got block %d", expected, deliverReply.GetBlock().Header.Number) - } + } + if expected := specifiedStart + count; deliverReply.GetBlock().Header.Number != expected { + t.Fatalf("Expected block %d but got block %d", expected, deliverReply.GetBlock().Header.Number) } case <-time.After(time.Second): t.Fatalf("Timed out waiting to get all blocks")