-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ed5054
commit d9f528e
Showing
20 changed files
with
59 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,24 @@ | ||
package types | ||
|
||
import "encoding/binary" | ||
import ( | ||
"encoding/binary" | ||
) | ||
|
||
var _ binary.ByteOrder | ||
|
||
const ( | ||
// MonitoredChainKeyPrefix is the prefix to retrieve all MonitoredChain | ||
MonitoredChainKeyPrefix = "MonitoredChain/value/" | ||
MonitoredChainKeyPrefix byte = iota | ||
// ChainToChannelKeyPrefix is the prefix to retrieve channel by monitored chain id | ||
ChainToChannelKeyPrefix = "ChainToChannel/value/" | ||
ChainToChannelKeyPrefix | ||
) | ||
|
||
// MonitoredChainKey returns the store key to retrieve a MonitoredChain from the index fields | ||
func MonitoredChainKey( | ||
chainId string, | ||
) []byte { | ||
var key []byte | ||
|
||
chainIdBytes := []byte(chainId) | ||
key = append(key, chainIdBytes...) | ||
key = append(key, []byte("/")...) | ||
|
||
return key | ||
func MonitoredChainKey(chainId string) []byte { | ||
return append([]byte{MonitoredChainKeyPrefix}, []byte(chainId)...) | ||
} | ||
|
||
// ChainToChannelKey returns the store key to retrieve a channel of the MonitoredChain from the index fields | ||
func ChainToChannelKey( | ||
chainId string, | ||
) []byte { | ||
var key []byte | ||
|
||
chainIdBytes := []byte(chainId) | ||
key = append(key, chainIdBytes...) | ||
key = append(key, []byte("/")...) | ||
|
||
return key | ||
func ChainToChannelKey(chainId string) []byte { | ||
return append([]byte{ChainToChannelKeyPrefix}, []byte(chainId)...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters