Skip to content

Commit

Permalink
revert: api breakage (#5700)
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner authored Jan 24, 2024
1 parent ba35062 commit 982fefe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/core/04-channel/types/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ func (ch Channel) GetVersion() string {
return ch.Version
}

// IsOpen returns true if the channel state is OPEN
func (ch Channel) IsOpen() bool {
return ch.State == OPEN
}

// IsClosed returns true if the channel state is CLOSED
func (ch Channel) IsClosed() bool {
return ch.State == CLOSED
}

// ValidateBasic performs a basic validation of the channel fields
func (ch Channel) ValidateBasic() error {
if ch.State == UNINITIALIZED {
Expand Down

0 comments on commit 982fefe

Please sign in to comment.