Skip to content

Commit

Permalink
reduce redundancy (#7959)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
colin-axner and mergify[bot] authored Nov 17, 2020
1 parent ab71048 commit 715933b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/ibc/core/24-host/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func ClientStateKey() []byte {
// FullConsensusStatePath takes a client identifier and returns a Path under which to
// store the consensus state of a client.
func FullConsensusStatePath(clientID string, height exported.Height) string {
return FullClientPath(clientID, fmt.Sprintf("%s/%s", KeyConsensusStatePrefix, height))
return FullClientPath(clientID, ConsensusStatePath(height))
}

// FullConsensusStateKey returns the store key for the consensus state of a particular
Expand Down Expand Up @@ -177,7 +177,7 @@ func NextSequenceAckKey(portID, channelID string) []byte {

// PacketCommitmentPath defines the commitments to packet data fields store path
func PacketCommitmentPath(portID, channelID string, sequence uint64) string {
return fmt.Sprintf("%s/%s/%s", KeyPacketCommitmentPrefix, channelPath(portID, channelID), sequencePath(sequence))
return fmt.Sprintf("%s/%d", PacketCommitmentPrefixPath(portID, channelID), sequence)
}

// PacketCommitmentKey returns the store key of under which a packet commitment
Expand All @@ -193,7 +193,7 @@ func PacketCommitmentPrefixPath(portID, channelID string) string {

// PacketAcknowledgementPath defines the packet acknowledgement store path
func PacketAcknowledgementPath(portID, channelID string, sequence uint64) string {
return fmt.Sprintf("%s/%s/%s", KeyPacketAckPrefix, channelPath(portID, channelID), sequencePath(sequence))
return fmt.Sprintf("%s/%d", PacketAcknowledgementPrefixPath(portID, channelID), sequence)
}

// PacketAcknowledgementKey returns the store key of under which a packet
Expand Down

0 comments on commit 715933b

Please sign in to comment.