@@ -130,11 +130,11 @@ func capabilitiesSupportedOrPanic(res channelconfig.Resources) {
130
130
}
131
131
132
132
if err := ac .Capabilities ().Supported (); err != nil {
133
- peerLogger .Panicf ("[channel %s] incompatible %s" , res .ConfigtxValidator (), err )
133
+ peerLogger .Panicf ("[channel %s] incompatible: %s" , res .ConfigtxValidator (). ChainID (), err )
134
134
}
135
135
136
136
if err := res .ChannelConfig ().Capabilities ().Supported (); err != nil {
137
- peerLogger .Panicf ("[channel %s] incompatible %s" , res .ConfigtxValidator (), err )
137
+ peerLogger .Panicf ("[channel %s] incompatible: %s" , res .ConfigtxValidator (). ChainID (), err )
138
138
}
139
139
}
140
140
@@ -232,7 +232,7 @@ func Initialize(init func(string), ccp ccprovider.ChaincodeProvider, sccp sysccp
232
232
func InitChain (cid string ) {
233
233
if chainInitializer != nil {
234
234
// Initialize chaincode, namely deploy system CC
235
- peerLogger .Debugf ("Init chain %s" , cid )
235
+ peerLogger .Debugf ("Initializing channel %s" , cid )
236
236
chainInitializer (cid )
237
237
}
238
238
}
@@ -372,13 +372,13 @@ func createChain(cid string, ledger ledger.PeerLedger, cb *common.Block, ccp ccp
372
372
373
373
ordererAddresses := bundle .ChannelConfig ().OrdererAddresses ()
374
374
if len (ordererAddresses ) == 0 {
375
- return errors .New ("No ordering service endpoint provided in configuration block" )
375
+ return errors .New ("no ordering service endpoint provided in configuration block" )
376
376
}
377
377
378
378
// TODO: does someone need to call Close() on the transientStoreFactory at shutdown of the peer?
379
379
store , err := TransientStoreFactory .OpenStore (bundle .ConfigtxValidator ().ChainID ())
380
380
if err != nil {
381
- return errors .Wrapf (err , "Failed opening transient store for %s " , bundle .ConfigtxValidator ().ChainID ())
381
+ return errors .Wrapf (err , "[channel %s] failed opening transient store" , bundle .ConfigtxValidator ().ChainID ())
382
382
}
383
383
csStoreSupport := & collectionSupport {
384
384
PeerLedger : ledger ,
@@ -413,7 +413,7 @@ func CreateChainFromBlock(cb *common.Block, ccp ccprovider.ChaincodeProvider, sc
413
413
414
414
var l ledger.PeerLedger
415
415
if l , err = ledgermgmt .CreateLedger (cb ); err != nil {
416
- return fmt . Errorf ( "Cannot create ledger from genesis block, due to %s" , err )
416
+ return errors . WithMessage ( err , "cannot create ledger from genesis block" )
417
417
}
418
418
419
419
return createChain (cid , l , cb , ccp , sccp , pluginMapper )
@@ -612,15 +612,15 @@ func GetMSPIDs(cid string) []string {
612
612
return nil
613
613
}
614
614
615
- // SetCurrConfigBlock sets the current config block of the specified chain
615
+ // SetCurrConfigBlock sets the current config block of the specified channel
616
616
func SetCurrConfigBlock (block * common.Block , cid string ) error {
617
617
chains .Lock ()
618
618
defer chains .Unlock ()
619
619
if c , ok := chains .list [cid ]; ok {
620
620
c .cb = block
621
621
return nil
622
622
}
623
- return fmt .Errorf ("Chain %s doesn't exist on the peer" , cid )
623
+ return errors .Errorf ("[channel %s] channel not associated with this peer" , cid )
624
624
}
625
625
626
626
// GetLocalIP returns the non loopback local IP of the host
@@ -724,7 +724,7 @@ func (flbs fileLedgerBlockStore) RetrieveBlocks(startBlockNumber uint64) (common
724
724
return flbs .GetBlocksIterator (startBlockNumber )
725
725
}
726
726
727
- // NewResourceConfigSupport returns
727
+ // NewConfigSupport returns
728
728
func NewConfigSupport () cc.Manager {
729
729
return & configSupport {}
730
730
}
@@ -741,7 +741,7 @@ func (*configSupport) GetChannelConfig(channel string) cc.Config {
741
741
defer chains .RUnlock ()
742
742
chain := chains .list [channel ]
743
743
if chain == nil {
744
- peerLogger .Error ( "GetChannelConfig: channel" , channel , " not found in the list of channels associated with this peer" )
744
+ peerLogger .Errorf ( "[ channel %s] channel not associated with this peer", channel )
745
745
return nil
746
746
}
747
747
return chain .cs .bundleSource .ConfigtxValidator ()
0 commit comments