Skip to content

Commit

Permalink
Merge PR #706: Remove NewRelayMsgs function
Browse files Browse the repository at this point in the history
It was only called in one place, and it only set nil slices as empty
slices, so it doesn't seem necessary to keep around.
  • Loading branch information
mark-rushakoff authored Apr 13, 2022
1 parent e6af06b commit 3890f2d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion relayer/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ func (c *Chain) CloseChannelStep(ctx context.Context, dst *Chain, srcChanID, src
return nil, false, err
}

out := NewRelayMsgs()
out := new(RelayMsgs)
if err := ValidatePaths(c, dst); err != nil {
return nil, false, err
}
Expand Down
5 changes: 0 additions & 5 deletions relayer/relayMsgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ type RelayMsgs struct {
MaxMsgLength uint64 `json:"max_msg_length"` // maximum amount of messages in a bundled relay transaction
}

// NewRelayMsgs returns an initialized version of relay messages
func NewRelayMsgs() *RelayMsgs {
return &RelayMsgs{Src: []provider.RelayerMessage{}, Dst: []provider.RelayerMessage{}}
}

// Ready returns true if there are messages to relay
func (r *RelayMsgs) Ready() bool {
if r == nil {
Expand Down

0 comments on commit 3890f2d

Please sign in to comment.