From 30a70b71945479eeb5b2f66abf95bedad3a2a3ac Mon Sep 17 00:00:00 2001 From: Artem Barger Date: Thu, 13 Sep 2018 18:27:45 +0300 Subject: [PATCH] [FAB-11996] Enable creation of raft based channels This commit enables creation of Raft based channel and aligns unit-tests accordingly. Change-Id: Iead5cddcab5137b0bce9740f47db8a3f583f2f4f Signed-off-by: Artem Barger --- orderer/consensus/etcdraft/chain.go | 2 +- orderer/consensus/etcdraft/chain_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/orderer/consensus/etcdraft/chain.go b/orderer/consensus/etcdraft/chain.go index 0fe7e8d8d03..21f1ebe9eb7 100644 --- a/orderer/consensus/etcdraft/chain.go +++ b/orderer/consensus/etcdraft/chain.go @@ -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 { diff --git a/orderer/consensus/etcdraft/chain_test.go b/orderer/consensus/etcdraft/chain_test.go index 9f015e03553..1c6808b2153 100644 --- a/orderer/consensus/etcdraft/chain_test.go +++ b/orderer/consensus/etcdraft/chain_test.go @@ -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