Skip to content

Commit

Permalink
[FAB-11996] Enable creation of raft based channels
Browse files Browse the repository at this point in the history
This commit enables creation of Raft based channel and aligns unit-tests
accordingly.

Change-Id: Iead5cddcab5137b0bce9740f47db8a3f583f2f4f
Signed-off-by: Artem Barger <bartem@il.ibm.com>
  • Loading branch information
C0rWin authored and mastersingh24 committed Oct 14, 2018
1 parent 9d3f4f2 commit 30a70b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion orderer/consensus/etcdraft/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (c *Chain) checkConfigUpdateValidity(ctx *common.Envelope) error {

switch chdr.Type {
case int32(common.HeaderType_ORDERER_TRANSACTION):
return errors.Errorf("channel creation requests not supported yet")
return nil
case int32(common.HeaderType_CONFIG):
configEnv, err := configtx.UnmarshalConfigEnvelope(payload.Data)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions orderer/consensus/etcdraft/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,9 @@ var _ = Describe("Chain", func() {
configSeq = 0
}) // BeforeEach block

It("should throw an error", func() {
It("should be able to create a channel", func() {
err := chain.Configure(configEnv, configSeq)
Expect(err).To(MatchError("channel creation requests not supported yet"))
Expect(err).NotTo(HaveOccurred())
})
})
}) // Context block for type A config
Expand Down

0 comments on commit 30a70b7

Please sign in to comment.