-
Notifications
You must be signed in to change notification settings - Fork 0
/
inactive_chain.go
50 lines (37 loc) · 988 Bytes
/
inactive_chain.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
Copyright IBM Corp. 2017 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package inactive
import (
"github.com/Yunpeng-J/fabric-protos-go/common"
"github.com/Yunpeng-J/HLF-2.2/orderer/common/types"
)
// Chain implements an inactive consenter.Chain
// which is used to denote that the current orderer node
// does not service a specific channel.
type Chain struct {
Err error
}
func (c *Chain) Order(_ *common.Envelope, _ uint64) error {
return c.Err
}
func (c *Chain) Configure(_ *common.Envelope, _ uint64) error {
return c.Err
}
func (c *Chain) WaitReady() error {
return c.Err
}
func (*Chain) Errored() <-chan struct{} {
closedChannel := make(chan struct{})
close(closedChannel)
return closedChannel
}
func (c *Chain) Start() {
}
func (c *Chain) Halt() {
}
// StatusReport returns the ClusterRelation & Status
func (c *Chain) StatusReport() (types.ClusterRelation, types.Status) {
return types.ClusterRelationConfigTracker, types.StatusInactive
}