github.com/anjalikarhana/fabric@v2.1.1+incompatible/orderer/consensus/inactive/inactive_chain.go (about) 1 /* 2 Copyright IBM Corp. 2017 All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package inactive 8 9 import ( 10 "github.com/hyperledger/fabric-protos-go/common" 11 ) 12 13 // Chain implements an inactive consenter.Chain 14 // which is used to denote that the current orderer node 15 // does not service a specific channel. 16 type Chain struct { 17 Err error 18 } 19 20 func (c *Chain) Order(_ *common.Envelope, _ uint64) error { 21 return c.Err 22 } 23 24 func (c *Chain) Configure(_ *common.Envelope, _ uint64) error { 25 return c.Err 26 } 27 28 func (c *Chain) WaitReady() error { 29 return c.Err 30 } 31 32 func (*Chain) Errored() <-chan struct{} { 33 closedChannel := make(chan struct{}) 34 close(closedChannel) 35 return closedChannel 36 } 37 38 func (c *Chain) Start() { 39 40 } 41 42 func (c *Chain) Halt() { 43 44 }