Skip to content

Commit ae204cd

Browse files
authored
Merge pull request #128 from hyperledger-labs/remove-unused-code
Remove unused `ordered` parameter
2 parents eb9a250 + 90fb6c2 commit ae204cd

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

cmd/tx.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ func createChannelCmd(ctx *config.Context) *cobra.Command {
186186
if _, err = c[dst].GetAddress(); err != nil {
187187
return err
188188
}
189-
190-
return core.CreateChannel(c[src], c[dst], false, to)
189+
return core.CreateChannel(c[src], c[dst], to)
191190
},
192191
}
193192

core/channel.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@ import (
1313

1414
// CreateChannel runs the channel creation messages on timeout until they pass
1515
// TODO: add max retries or something to this function
16-
func CreateChannel(src, dst *ProvableChain, ordered bool, to time.Duration) error {
16+
func CreateChannel(src, dst *ProvableChain, to time.Duration) error {
1717
logger := GetChannelPairLogger(src, dst)
1818
defer logger.TimeTrack(time.Now(), "CreateChannel")
19-
var order chantypes.Order
20-
if ordered {
21-
order = chantypes.ORDERED
22-
} else {
23-
order = chantypes.UNORDERED
24-
}
2519

2620
ticker := time.NewTicker(to)
2721
failures := 0
2822
for ; true; <-ticker.C {
29-
chanSteps, err := createChannelStep(src, dst, order)
23+
chanSteps, err := createChannelStep(src, dst)
3024
if err != nil {
3125
logger.Error(
3226
"failed to create channel step",
@@ -75,7 +69,7 @@ func CreateChannel(src, dst *ProvableChain, ordered bool, to time.Duration) erro
7569
return nil
7670
}
7771

78-
func createChannelStep(src, dst *ProvableChain, ordering chantypes.Order) (*RelayMsgs, error) {
72+
func createChannelStep(src, dst *ProvableChain) (*RelayMsgs, error) {
7973
out := NewRelayMsgs()
8074
if err := validatePaths(src, dst); err != nil {
8175
return nil, err

0 commit comments

Comments
 (0)