forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inactive_chain.go
49 lines (36 loc) · 907 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
/*
Copyright IBM Corp. 2017 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package inactive
import (
"github.com/hyperledger/fabric/orderer/consensus/migration"
"github.com/hyperledger/fabric/protos/common"
)
// 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() {
}
func (c *Chain) MigrationStatus() migration.Status {
return migration.NewManager(false, "inactive")
}