mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
26 lines
511 B
Go
26 lines
511 B
Go
|
package chainreg
|
||
|
|
||
|
// ChainCode is an enum-like structure for keeping track of the chains
|
||
|
// currently supported within lnd.
|
||
|
type ChainCode uint32
|
||
|
|
||
|
const (
|
||
|
// BitcoinChain is Bitcoin's chain.
|
||
|
BitcoinChain ChainCode = iota
|
||
|
|
||
|
// LitecoinChain is Litecoin's chain.
|
||
|
LitecoinChain
|
||
|
)
|
||
|
|
||
|
// String returns a string representation of the target ChainCode.
|
||
|
func (c ChainCode) String() string {
|
||
|
switch c {
|
||
|
case BitcoinChain:
|
||
|
return "bitcoin"
|
||
|
case LitecoinChain:
|
||
|
return "litecoin"
|
||
|
default:
|
||
|
return "kekcoin"
|
||
|
}
|
||
|
}
|