reduce redundancy (#7959)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
colin axnér 2020-11-17 16:01:34 +01:00 committed by GitHub
parent ab7104865d
commit 715933b5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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
@ -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
@ -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