Skip to content

Commit 90fb6c2

Browse files
committed
remove unused ordered parameter
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
1 parent df66cae commit 90fb6c2

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
@@ -169,8 +169,7 @@ func createChannelCmd(ctx *config.Context) *cobra.Command {
169169
if _, err = c[dst].GetAddress(); err != nil {
170170
return err
171171
}
172-
173-
return core.CreateChannel(c[src], c[dst], false, to)
172+
return core.CreateChannel(c[src], c[dst], to)
174173
},
175174
}
176175

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)