Skip to content

Commit

Permalink
docs: code block alignment in channel upgrades doc
Browse files Browse the repository at this point in the history
  • Loading branch information
crodriguezvega committed Jan 5, 2024
1 parent 2e349d3 commit 4d94425
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions docs/docs/01-ibc/06-channel-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,43 +75,43 @@ These states may consist of:

```go
const (
// Default State
UNINITIALIZED State = 0
// A channel has just started the opening handshake.
INIT State = 1
// A channel has acknowledged the handshake step on the counterparty chain.
TRYOPEN State = 2
// A channel has completed the handshake. Open channels are
// ready to send and receive packets.
OPEN State = 3
// A channel has been closed and can no longer be used to send or receive
// packets.
CLOSED State = 4
// A channel has just accepted the upgrade handshake attempt and is flushing in-flight packets.
FLUSHING State = 5
// A channel has just completed flushing any in-flight packets.
FLUSHCOMPLETE State = 6
// Default State
UNINITIALIZED State = 0
// A channel has just started the opening handshake.
INIT State = 1
// A channel has acknowledged the handshake step on the counterparty chain.
TRYOPEN State = 2
// A channel has completed the handshake. Open channels are
// ready to send and receive packets.
OPEN State = 3
// A channel has been closed and can no longer be used to send or receive
// packets.
CLOSED State = 4
// A channel has just accepted the upgrade handshake attempt and is flushing in-flight packets.
FLUSHING State = 5
// A channel has just completed flushing any in-flight packets.
FLUSHCOMPLETE State = 6
)
```

These are found in `State` on the `Channel` struct:

```go
type Channel struct {
// current state of the channel end
State State `protobuf:"varint,1,opt,name=state,proto3,enum=ibc.core.channel.v1.State" json:"state,omitempty"`
// whether the channel is ordered or unordered
Ordering Order `protobuf:"varint,2,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"`
// counterparty channel end
Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"`
// list of connection identifiers, in order, along which packets sent on
// this channel will travel
ConnectionHops []string `protobuf:"bytes,4,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"`
// opaque channel version, which is agreed upon during the handshake
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
// upgrade sequence indicates the latest upgrade attempt performed by this channel
// the value of 0 indicates the channel has never been upgraded
UpgradeSequence uint64 `protobuf:"varint,6,opt,name=upgrade_sequence,json=upgradeSequence,proto3" json:"upgrade_sequence,omitempty"`
// current state of the channel end
State State `protobuf:"varint,1,opt,name=state,proto3,enum=ibc.core.channel.v1.State" json:"state,omitempty"`
// whether the channel is ordered or unordered
Ordering Order `protobuf:"varint,2,opt,name=ordering,proto3,enum=ibc.core.channel.v1.Order" json:"ordering,omitempty"`
// counterparty channel end
Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"`
// list of connection identifiers, in order, along which packets sent on
// this channel will travel
ConnectionHops []string `protobuf:"bytes,4,rep,name=connection_hops,json=connectionHops,proto3" json:"connection_hops,omitempty"`
// opaque channel version, which is agreed upon during the handshake
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
// upgrade sequence indicates the latest upgrade attempt performed by this channel
// the value of 0 indicates the channel has never been upgraded
UpgradeSequence uint64 `protobuf:"varint,6,opt,name=upgrade_sequence,json=upgradeSequence,proto3" json:"upgrade_sequence,omitempty"`
}
```

Expand Down

0 comments on commit 4d94425

Please sign in to comment.