Skip to content

Commit b4816a6

Browse files
committed
[FAB-14324] remove mock-only nil check
The tests pass without it. Change-Id: I909cc42105569ca942815e72e19379d11822a0ba Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent 67c0e3f commit b4816a6

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

core/peer/peer.go

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,25 +131,20 @@ func (c *chain) Apply(configtx *common.ConfigEnvelope) error {
131131
return err
132132
}
133133

134-
// If the chainSupport is being mocked, this field will be nil
135-
if c.bundleSource != nil {
136-
bundle, err := channelconfig.NewBundle(c.cs.ConfigtxValidator().ChainID(), configtx.Config)
137-
if err != nil {
138-
return err
139-
}
140-
141-
channelconfig.LogSanityChecks(bundle)
142-
143-
err = c.bundleSource.ValidateNew(bundle)
144-
if err != nil {
145-
return err
146-
}
147-
148-
capabilitiesSupportedOrPanic(bundle)
134+
bundle, err := channelconfig.NewBundle(c.cs.ConfigtxValidator().ChainID(), configtx.Config)
135+
if err != nil {
136+
return err
137+
}
149138

150-
c.bundleSource.Update(bundle)
139+
channelconfig.LogSanityChecks(bundle)
140+
err = c.bundleSource.ValidateNew(bundle)
141+
if err != nil {
142+
return err
151143
}
152144

145+
capabilitiesSupportedOrPanic(bundle)
146+
147+
c.bundleSource.Update(bundle)
153148
return nil
154149
}
155150

0 commit comments

Comments
 (0)