Skip to content

Commit

Permalink
provable keys
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaSripal committed Oct 28, 2024
1 parent f7c1491 commit 3814018
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/core/24-host/v2/packet_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)

// PacketCommitmentKey returns the store key of under which a packet commitment is stored.
func PacketCommitmentKey(channelID string, sequence uint64) []byte {
return append(append([]byte(channelID), byte(1)), sdk.Uint64ToBigEndian(sequence)...)
}

// PacketReceiptKey returns the store key of under which a packet
// receipt is stored
func PacketReceiptKey(channelID string, sequence uint64) []byte {
return append(append([]byte(channelID), byte(3)), sdk.Uint64ToBigEndian(sequence)...)
return append(append([]byte(channelID), byte(2)), sdk.Uint64ToBigEndian(sequence)...)
}

// PacketAcknowledgementKey returns the store key of under which a packet acknowledgement is stored.
func PacketAcknowledgementKey(channelID string, sequence uint64) []byte {
return append(append([]byte(channelID), byte(2)), sdk.Uint64ToBigEndian(sequence)...)
}

// PacketCommitmentKey returns the store key of under which a packet commitment is stored.
func PacketCommitmentKey(channelID string, sequence uint64) []byte {
return append(append([]byte(channelID), byte(1)), sdk.Uint64ToBigEndian(sequence)...)
return append(append([]byte(channelID), byte(3)), sdk.Uint64ToBigEndian(sequence)...)
}

// NextSequenceSendKey returns the store key for the next sequence send of a given channelID.
Expand Down

0 comments on commit 3814018

Please sign in to comment.