github.com/decred/dcrlnd@v0.7.6/htlcswitch/hop/network.go (about)

     1  package hop
     2  
     3  // Network indicates the blockchain network that is intended to be the next hop
     4  // for a forwarded HTLC. The existence of this field within the ForwardingInfo
     5  // struct enables the ability for HTLC to cross chain-boundaries at will.
     6  type Network uint8
     7  
     8  const (
     9  	// BitcoinNetwork denotes that an HTLC is to be forwarded along the
    10  	// Bitcoin link with the specified short channel ID.
    11  	BitcoinNetwork Network = iota
    12  
    13  	// LitecoinNetwork denotes that an HTLC is to be forwarded along the
    14  	// Litecoin link with the specified short channel ID.
    15  	LitecoinNetwork
    16  
    17  	// DecredNetwork denotes that an HTLC is to be forwarded along the
    18  	// Decred link with the specified short channel ID.
    19  	DecredNetwork
    20  )
    21  
    22  // String returns the string representation of the target Network.
    23  func (c Network) String() string {
    24  	switch c {
    25  	case BitcoinNetwork:
    26  		return "Bitcoin"
    27  	case LitecoinNetwork:
    28  		return "Litecoin"
    29  	case DecredNetwork:
    30  		return "Decred"
    31  	default:
    32  		return "Kekcoin"
    33  	}
    34  }