Skip to content

Commit 08074ef

Browse files
committed
FAB-15686 Rename Chain to Channel
Rename Chain to Channel in log & error messages. Change-Id: I1dfa5c25ee19cabc180fa7ed786130892d4df507 Signed-off-by: Yoav Tock <tock@il.ibm.com>
1 parent f2cc88c commit 08074ef

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

orderer/common/multichannel/chainsupport.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (cs *ChainSupport) DetectConsensusMigration() bool {
9999

100100
lastConfigIndex, err := protoutil.GetLastConfigIndexFromBlock(cs.lastBlock)
101101
if err != nil {
102-
logger.Panicf("[channel: %s] Chain did not have appropriately encoded last config in its latest block: %s",
102+
logger.Panicf("[channel: %s] Channel did not have appropriately encoded last config in its latest block: %s",
103103
cs.ChainID(), err)
104104
}
105105
logger.Debugf("[channel: %s] lastBlockNumber=%d, lastConfigIndex=%d",
@@ -128,7 +128,7 @@ func (cs *ChainSupport) DetectConsensusMigration() bool {
128128
prevBlock := blockledger.GetBlock(cs.Reader(), cs.lastBlock.Header.Number-1)
129129
prevConfigIndex, err := protoutil.GetLastConfigIndexFromBlock(prevBlock)
130130
if err != nil {
131-
logger.Panicf("Chain did not have appropriately encoded last config in block %d: %s",
131+
logger.Panicf("Channel did not have appropriately encoded last config in block %d: %s",
132132
prevBlock.Header.Number, err)
133133
}
134134
if prevConfigIndex != prevBlock.Header.Number {

orderer/common/server/main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ func Main() {
199199
// Extract system channel last config block
200200
func extractSysChanLastConfig(lf blockledger.Factory, bootstrapBlock *cb.Block) *cb.Block {
201201
// Are we bootstrapping?
202-
num := len(lf.ChainIDs())
203-
if num == 0 {
204-
logger.Info("Bootstrapping because no existing chains")
202+
chainCount := len(lf.ChainIDs())
203+
if chainCount == 0 {
204+
logger.Info("Bootstrapping because no existing channels")
205205
return nil
206206
}
207-
logger.Infof("Not bootstrapping because of %d existing chains", num)
207+
logger.Infof("Not bootstrapping because of %d existing channels", chainCount)
208208

209209
systemChannelName, err := protoutil.GetChainIDFromBlock(bootstrapBlock)
210210
if err != nil {
@@ -548,11 +548,11 @@ func extractBootstrapBlock(conf *localconfig.TopLevel) *cb.Block {
548548
func initializeBootstrapChannel(genesisBlock *cb.Block, lf blockledger.Factory) {
549549
chainID, err := protoutil.GetChainIDFromBlock(genesisBlock)
550550
if err != nil {
551-
logger.Fatal("Failed to parse chain ID from genesis block:", err)
551+
logger.Fatal("Failed to parse channel ID from genesis block:", err)
552552
}
553553
gl, err := lf.GetOrCreate(chainID)
554554
if err != nil {
555-
logger.Fatal("Failed to create the system chain:", err)
555+
logger.Fatal("Failed to create the system channel:", err)
556556
}
557557

558558
if err := gl.Append(genesisBlock); err != nil {
@@ -650,7 +650,7 @@ func initializeMultichannelRegistrar(
650650
if len(lf.ChainIDs()) == 0 {
651651
initializeBootstrapChannel(genesisBlock, lf)
652652
} else {
653-
logger.Info("Not bootstrapping because of existing chains")
653+
logger.Info("Not bootstrapping because of existing channels")
654654
}
655655

656656
consenters := make(map[string]consensus.Consenter)

0 commit comments

Comments
 (0)