Skip to content

Commit 3fb58c8

Browse files
Jason Yellickkchristidis
Jason Yellick
authored andcommitted
[FAB-2735] (PA) Clean up config mocks
The config mock structure did not keep up with the changes in the config code, and was therefore using old interface names and paths. This CR fixes the mock config structures to use the correct name, and restructures them in the same way the real config structures were restructured. Change-Id: If5201b3ca73c498b56701eea3c6bf50d7e587178 Signed-off-by: Jason Yellick <[email protected]> Signed-off-by: Kostas Christidis <[email protected]>
1 parent 0fcb145 commit 3fb58c8

File tree

9 files changed

+55
-52
lines changed

9 files changed

+55
-52
lines changed

common/mocks/configvalues/channel/sharedconfig.go common/mocks/config/channel.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package channel
17+
package config
1818

1919
import "github.com/hyperledger/fabric/common/util"
2020

2121
func nearIdentityHash(input []byte) []byte {
2222
return util.ConcatenateBytes([]byte("FakeHash("), input, []byte(""))
2323
}
2424

25-
// SharedConfig is a mock implementation of sharedconfig.SharedConfig
26-
type SharedConfig struct {
25+
// Channel is a mock implementation of config.Channel
26+
type Channel struct {
2727
// HashingAlgorithmVal is returned as the result of HashingAlgorithm() if set
2828
HashingAlgorithmVal func([]byte) []byte
2929
// BlockDataHashingStructureWidthVal is returned as the result of BlockDataHashingStructureWidth()
@@ -33,19 +33,19 @@ type SharedConfig struct {
3333
}
3434

3535
// HashingAlgorithm returns the HashingAlgorithmVal if set, otherwise a fake simple hash function
36-
func (scm *SharedConfig) HashingAlgorithm() func([]byte) []byte {
36+
func (scm *Channel) HashingAlgorithm() func([]byte) []byte {
3737
if scm.HashingAlgorithmVal == nil {
3838
return nearIdentityHash
3939
}
4040
return scm.HashingAlgorithmVal
4141
}
4242

4343
// BlockDataHashingStructureWidth returns the BlockDataHashingStructureWidthVal
44-
func (scm *SharedConfig) BlockDataHashingStructureWidth() uint32 {
44+
func (scm *Channel) BlockDataHashingStructureWidth() uint32 {
4545
return scm.BlockDataHashingStructureWidthVal
4646
}
4747

4848
// OrdererAddresses returns the OrdererAddressesVal
49-
func (scm *SharedConfig) OrdererAddresses() []string {
49+
func (scm *Channel) OrdererAddresses() []string {
5050
return scm.OrdererAddressesVal
5151
}

common/mocks/configvalues/channel/sharedconfig_test.go common/mocks/config/channel_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package channel
17+
package config
1818

1919
import (
2020
"testing"
2121

2222
"github.com/hyperledger/fabric/common/config"
2323
)
2424

25-
func TestChainConfigInterface(t *testing.T) {
26-
_ = config.Channel(&SharedConfig{})
25+
func TestChannelConfigInterface(t *testing.T) {
26+
_ = config.Channel(&Channel{})
2727
}

common/mocks/configvalues/channel/orderer/sharedconfig.go common/mocks/config/orderer.go

+13-10
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package sharedconfig
17+
package config
1818

19-
import ab "github.com/hyperledger/fabric/protos/orderer"
20-
import "time"
19+
import (
20+
"time"
2121

22-
// SharedConfig is a mock implementation of sharedconfig.SharedConfig
23-
type SharedConfig struct {
22+
ab "github.com/hyperledger/fabric/protos/orderer"
23+
)
24+
25+
// Orderer is a mock implementation of config.Orderer
26+
type Orderer struct {
2427
// ConsensusTypeVal is returned as the result of ConsensusType()
2528
ConsensusTypeVal string
2629
// BatchSizeVal is returned as the result of BatchSize()
@@ -34,26 +37,26 @@ type SharedConfig struct {
3437
}
3538

3639
// ConsensusType returns the ConsensusTypeVal
37-
func (scm *SharedConfig) ConsensusType() string {
40+
func (scm *Orderer) ConsensusType() string {
3841
return scm.ConsensusTypeVal
3942
}
4043

4144
// BatchSize returns the BatchSizeVal
42-
func (scm *SharedConfig) BatchSize() *ab.BatchSize {
45+
func (scm *Orderer) BatchSize() *ab.BatchSize {
4346
return scm.BatchSizeVal
4447
}
4548

4649
// BatchTimeout returns the BatchTimeoutVal
47-
func (scm *SharedConfig) BatchTimeout() time.Duration {
50+
func (scm *Orderer) BatchTimeout() time.Duration {
4851
return scm.BatchTimeoutVal
4952
}
5053

5154
// KafkaBrokers returns the KafkaBrokersVal
52-
func (scm *SharedConfig) KafkaBrokers() []string {
55+
func (scm *Orderer) KafkaBrokers() []string {
5356
return scm.KafkaBrokersVal
5457
}
5558

5659
// MaxChannelsCount returns the MaxChannelsCountVal
57-
func (scm *SharedConfig) MaxChannelsCount() uint64 {
60+
func (scm *Orderer) MaxChannelsCount() uint64 {
5861
return scm.MaxChannelsCountVal
5962
}

common/mocks/configvalues/channel/orderer/sharedconfig_test.go common/mocks/config/orderer_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package sharedconfig
17+
package config
1818

1919
import (
2020
"testing"
2121

2222
"github.com/hyperledger/fabric/common/config"
2323
)
2424

25-
func TestSharedConfigInterface(t *testing.T) {
26-
_ = config.Orderer(&SharedConfig{})
25+
func TestOrdererConfigInterface(t *testing.T) {
26+
_ = config.Orderer(&Orderer{})
2727
}

orderer/common/blockcutter/blockcutter_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"bytes"
2121
"testing"
2222

23-
mockconfigtxorderer "github.com/hyperledger/fabric/common/mocks/configvalues/channel/orderer"
23+
mockconfig "github.com/hyperledger/fabric/common/mocks/config"
2424
"github.com/hyperledger/fabric/orderer/common/filter"
2525
cb "github.com/hyperledger/fabric/protos/common"
2626
ab "github.com/hyperledger/fabric/protos/orderer"
@@ -83,7 +83,7 @@ func TestNormalBatch(t *testing.T) {
8383
maxMessageCount := uint32(2)
8484
absoluteMaxBytes := uint32(1000)
8585
preferredMaxBytes := uint32(100)
86-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
86+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
8787

8888
batches, committers, ok := r.Ordered(goodTx)
8989

@@ -112,7 +112,7 @@ func TestBadMessageInBatch(t *testing.T) {
112112
maxMessageCount := uint32(2)
113113
absoluteMaxBytes := uint32(1000)
114114
preferredMaxBytes := uint32(100)
115-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
115+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
116116

117117
batches, committers, ok := r.Ordered(badTx)
118118

@@ -150,7 +150,7 @@ func TestUnmatchedMessageInBatch(t *testing.T) {
150150
maxMessageCount := uint32(2)
151151
absoluteMaxBytes := uint32(1000)
152152
preferredMaxBytes := uint32(100)
153-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
153+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
154154

155155
batches, committers, ok := r.Ordered(unmatchedTx)
156156

@@ -188,7 +188,7 @@ func TestIsolatedEmptyBatch(t *testing.T) {
188188
maxMessageCount := uint32(2)
189189
absoluteMaxBytes := uint32(1000)
190190
preferredMaxBytes := uint32(100)
191-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
191+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
192192

193193
batches, committers, ok := r.Ordered(isolatedTx)
194194

@@ -214,7 +214,7 @@ func TestIsolatedPartialBatch(t *testing.T) {
214214
maxMessageCount := uint32(2)
215215
absoluteMaxBytes := uint32(1000)
216216
preferredMaxBytes := uint32(100)
217-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
217+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: absoluteMaxBytes, PreferredMaxBytes: preferredMaxBytes}}, filters)
218218

219219
batches, committers, ok := r.Ordered(goodTx)
220220

@@ -264,7 +264,7 @@ func TestBatchSizePreferredMaxBytesOverflow(t *testing.T) {
264264
// set message count > 9
265265
maxMessageCount := uint32(20)
266266

267-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: preferredMaxBytes * 2, PreferredMaxBytes: preferredMaxBytes}}, filters)
267+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: preferredMaxBytes * 2, PreferredMaxBytes: preferredMaxBytes}}, filters)
268268

269269
// enqueue 9 messages
270270
for i := 0; i < 9; i++ {
@@ -319,7 +319,7 @@ func TestBatchSizePreferredMaxBytesOverflowNoPending(t *testing.T) {
319319
// set message count > 1
320320
maxMessageCount := uint32(20)
321321

322-
r := NewReceiverImpl(&mockconfigtxorderer.SharedConfig{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: preferredMaxBytes * 3, PreferredMaxBytes: preferredMaxBytes}}, filters)
322+
r := NewReceiverImpl(&mockconfig.Orderer{BatchSizeVal: &ab.BatchSize{MaxMessageCount: maxMessageCount, AbsoluteMaxBytes: preferredMaxBytes * 3, PreferredMaxBytes: preferredMaxBytes}}, filters)
323323

324324
// submit large message
325325
batches, committers, ok := r.Ordered(goodTxLarge)

orderer/kafka/orderer_test.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
"github.com/Shopify/sarama"
2626
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
27-
mockconfigvaluesorderer "github.com/hyperledger/fabric/common/mocks/configvalues/channel/orderer"
27+
mockconfig "github.com/hyperledger/fabric/common/mocks/config"
2828
"github.com/hyperledger/fabric/orderer/localconfig"
2929
mockblockcutter "github.com/hyperledger/fabric/orderer/mocks/blockcutter"
3030
mockmultichain "github.com/hyperledger/fabric/orderer/mocks/multichain"
@@ -36,8 +36,8 @@ import (
3636

3737
var cp = newChainPartition(provisional.TestChainID, rawPartition)
3838

39-
func newMockSharedConfigManager() *mockconfigvaluesorderer.SharedConfig {
40-
return &mockconfigvaluesorderer.SharedConfig{KafkaBrokersVal: testGenesisConf.Orderer.Kafka.Brokers}
39+
func newMockSharedConfigManager() *mockconfig.Orderer {
40+
return &mockconfig.Orderer{KafkaBrokersVal: testGenesisConf.Orderer.Kafka.Brokers}
4141
}
4242

4343
type mockConsenterImpl struct {
@@ -132,7 +132,7 @@ func TestKafkaConsenterEmptyBatch(t *testing.T) {
132132
Batches: make(chan []*cb.Envelope),
133133
BlockCutterVal: mockblockcutter.NewReceiver(),
134134
ChainIDVal: provisional.TestChainID,
135-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: testTimePadding},
135+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: testTimePadding},
136136
}
137137
defer close(cs.BlockCutterVal.Block)
138138

@@ -167,7 +167,7 @@ func TestKafkaConsenterBatchTimer(t *testing.T) {
167167
Batches: make(chan []*cb.Envelope),
168168
BlockCutterVal: mockblockcutter.NewReceiver(),
169169
ChainIDVal: provisional.TestChainID,
170-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
170+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
171171
}
172172
defer close(cs.BlockCutterVal.Block)
173173

@@ -219,7 +219,7 @@ func TestKafkaConsenterTimerHaltOnFilledBatch(t *testing.T) {
219219
Batches: make(chan []*cb.Envelope),
220220
BlockCutterVal: mockblockcutter.NewReceiver(),
221221
ChainIDVal: provisional.TestChainID,
222-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
222+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
223223
}
224224
defer close(cs.BlockCutterVal.Block)
225225

@@ -279,7 +279,7 @@ func TestKafkaConsenterConfigStyleMultiBatch(t *testing.T) {
279279
Batches: make(chan []*cb.Envelope),
280280
BlockCutterVal: mockblockcutter.NewReceiver(),
281281
ChainIDVal: provisional.TestChainID,
282-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: testTimePadding},
282+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: testTimePadding},
283283
}
284284
defer close(cs.BlockCutterVal.Block)
285285

@@ -329,7 +329,7 @@ func TestKafkaConsenterTimeToCutForced(t *testing.T) {
329329
Batches: make(chan []*cb.Envelope),
330330
BlockCutterVal: mockblockcutter.NewReceiver(),
331331
ChainIDVal: provisional.TestChainID,
332-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
332+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
333333
}
334334
defer close(cs.BlockCutterVal.Block)
335335

@@ -386,7 +386,7 @@ func TestKafkaConsenterTimeToCutDuplicate(t *testing.T) {
386386
Batches: make(chan []*cb.Envelope),
387387
BlockCutterVal: mockblockcutter.NewReceiver(),
388388
ChainIDVal: provisional.TestChainID,
389-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
389+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
390390
}
391391
defer close(cs.BlockCutterVal.Block)
392392

@@ -475,7 +475,7 @@ func TestKafkaConsenterTimeToCutStale(t *testing.T) {
475475
Batches: make(chan []*cb.Envelope),
476476
BlockCutterVal: mockblockcutter.NewReceiver(),
477477
ChainIDVal: provisional.TestChainID,
478-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
478+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
479479
}
480480
defer close(cs.BlockCutterVal.Block)
481481

@@ -534,7 +534,7 @@ func TestKafkaConsenterTimeToCutLarger(t *testing.T) {
534534
Batches: make(chan []*cb.Envelope),
535535
BlockCutterVal: mockblockcutter.NewReceiver(),
536536
ChainIDVal: provisional.TestChainID,
537-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
537+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
538538
}
539539
defer close(cs.BlockCutterVal.Block)
540540

@@ -616,7 +616,7 @@ func TestKafkaConsenterRestart(t *testing.T) {
616616
Batches: make(chan []*cb.Envelope),
617617
BlockCutterVal: mockblockcutter.NewReceiver(),
618618
ChainIDVal: provisional.TestChainID,
619-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
619+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
620620
}
621621
defer close(cs.BlockCutterVal.Block)
622622

orderer/mocks/multichain/multichain.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package multichain
1818

1919
import (
2020
"github.com/hyperledger/fabric/common/config"
21-
mockconfigtxorderer "github.com/hyperledger/fabric/common/mocks/configvalues/channel/orderer"
21+
mockconfig "github.com/hyperledger/fabric/common/mocks/config"
2222
"github.com/hyperledger/fabric/orderer/common/blockcutter"
2323
"github.com/hyperledger/fabric/orderer/common/filter"
2424
mockblockcutter "github.com/hyperledger/fabric/orderer/mocks/blockcutter"
@@ -34,7 +34,7 @@ var logger = logging.MustGetLogger("orderer/mocks/multichain")
3434
// Whenever a block is written, it writes to the Batches channel to allow for synchronization
3535
type ConsenterSupport struct {
3636
// SharedConfigVal is the value returned by SharedConfig()
37-
SharedConfigVal *mockconfigtxorderer.SharedConfig
37+
SharedConfigVal *mockconfig.Orderer
3838

3939
// BlockCutterVal is the value returned by BlockCutter()
4040
BlockCutterVal *mockblockcutter.Receiver

orderer/multichain/systemchain_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"github.com/hyperledger/fabric/common/config"
2424
"github.com/hyperledger/fabric/common/configtx"
2525
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
26+
mockconfig "github.com/hyperledger/fabric/common/mocks/config"
2627
mockconfigtx "github.com/hyperledger/fabric/common/mocks/configtx"
27-
mockconfigvaluesorderer "github.com/hyperledger/fabric/common/mocks/configvalues/channel/orderer"
2828
"github.com/hyperledger/fabric/orderer/common/filter"
2929
cb "github.com/hyperledger/fabric/protos/common"
3030
"github.com/hyperledger/fabric/protos/utils"
@@ -33,12 +33,12 @@ import (
3333
)
3434

3535
type mockSupport struct {
36-
msc *mockconfigvaluesorderer.SharedConfig
36+
msc *mockconfig.Orderer
3737
}
3838

3939
func newMockSupport() *mockSupport {
4040
return &mockSupport{
41-
msc: &mockconfigvaluesorderer.SharedConfig{},
41+
msc: &mockconfig.Orderer{},
4242
}
4343
}
4444

orderer/solo/consensus_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"testing"
2121
"time"
2222

23-
mockconfigvaluesorderer "github.com/hyperledger/fabric/common/mocks/configvalues/channel/orderer"
23+
mockconfig "github.com/hyperledger/fabric/common/mocks/config"
2424
mockblockcutter "github.com/hyperledger/fabric/orderer/mocks/blockcutter"
2525
mockmultichain "github.com/hyperledger/fabric/orderer/mocks/multichain"
2626
cb "github.com/hyperledger/fabric/protos/common"
@@ -59,7 +59,7 @@ func TestEmptyBatch(t *testing.T) {
5959
support := &mockmultichain.ConsenterSupport{
6060
Batches: make(chan []*cb.Envelope),
6161
BlockCutterVal: mockblockcutter.NewReceiver(),
62-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
62+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
6363
}
6464
defer close(support.BlockCutterVal.Block)
6565
bs := newChain(support)
@@ -80,7 +80,7 @@ func TestBatchTimer(t *testing.T) {
8080
support := &mockmultichain.ConsenterSupport{
8181
Batches: make(chan []*cb.Envelope),
8282
BlockCutterVal: mockblockcutter.NewReceiver(),
83-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
83+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
8484
}
8585
defer close(support.BlockCutterVal.Block)
8686
bs := newChain(support)
@@ -115,7 +115,7 @@ func TestBatchTimerHaltOnFilledBatch(t *testing.T) {
115115
support := &mockmultichain.ConsenterSupport{
116116
Batches: make(chan []*cb.Envelope),
117117
BlockCutterVal: mockblockcutter.NewReceiver(),
118-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
118+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
119119
}
120120
defer close(support.BlockCutterVal.Block)
121121

@@ -158,7 +158,7 @@ func TestConfigStyleMultiBatch(t *testing.T) {
158158
support := &mockmultichain.ConsenterSupport{
159159
Batches: make(chan []*cb.Envelope),
160160
BlockCutterVal: mockblockcutter.NewReceiver(),
161-
SharedConfigVal: &mockconfigvaluesorderer.SharedConfig{BatchTimeoutVal: batchTimeout},
161+
SharedConfigVal: &mockconfig.Orderer{BatchTimeoutVal: batchTimeout},
162162
}
163163
defer close(support.BlockCutterVal.Block)
164164
bs := newChain(support)

0 commit comments

Comments
 (0)