diff --git a/htlcswitch/hop/forwarding_info.go b/htlcswitch/hop/forwarding_info.go index 54b3274c2..3ec358a0a 100644 --- a/htlcswitch/hop/forwarding_info.go +++ b/htlcswitch/hop/forwarding_info.go @@ -10,10 +10,6 @@ import ( // received within the incoming HTLC, to ensure that the prior hop didn't // tamper with the end-to-end routing information at all. type ForwardingInfo struct { - // Network is the target blockchain network that the HTLC will travel - // over next. - Network Network - // NextHop is the channel ID of the next hop. The received HTLC should // be forwarded to this particular channel in order to continue the // end-to-end route. diff --git a/htlcswitch/hop/network.go b/htlcswitch/hop/network.go deleted file mode 100644 index 6f121642e..000000000 --- a/htlcswitch/hop/network.go +++ /dev/null @@ -1,28 +0,0 @@ -package hop - -// Network indicates the blockchain network that is intended to be the next hop -// for a forwarded HTLC. The existence of this field within the ForwardingInfo -// struct enables the ability for HTLC to cross chain-boundaries at will. -type Network uint8 - -const ( - // BitcoinNetwork denotes that an HTLC is to be forwarded along the - // Bitcoin link with the specified short channel ID. - BitcoinNetwork Network = iota - - // LitecoinNetwork denotes that an HTLC is to be forwarded along the - // Litecoin link with the specified short channel ID. - LitecoinNetwork -) - -// String returns the string representation of the target Network. -func (c Network) String() string { - switch c { - case BitcoinNetwork: - return "Bitcoin" - case LitecoinNetwork: - return "Litecoin" - default: - return "Kekcoin" - } -} diff --git a/htlcswitch/hop/payload.go b/htlcswitch/hop/payload.go index d4672766c..2e35c1abb 100644 --- a/htlcswitch/hop/payload.go +++ b/htlcswitch/hop/payload.go @@ -106,7 +106,6 @@ func NewLegacyPayload(f *sphinx.HopData) *Payload { return &Payload{ FwdInfo: ForwardingInfo{ - Network: BitcoinNetwork, NextHop: lnwire.NewShortChanIDFromInt(nextHop), AmountToForward: lnwire.MilliSatoshi(f.ForwardAmount), OutgoingCTLV: f.OutgoingCltv, @@ -187,7 +186,6 @@ func NewPayloadFromReader(r io.Reader) (*Payload, error) { return &Payload{ FwdInfo: ForwardingInfo{ - Network: BitcoinNetwork, NextHop: nextHop, AmountToForward: lnwire.MilliSatoshi(amt), OutgoingCTLV: cltv, diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index 95e0f343b..fe593c9c5 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -365,10 +365,6 @@ func (r *mockHopIterator) EncodeNextHop(w io.Writer) error { } func encodeFwdInfo(w io.Writer, f *hop.ForwardingInfo) error { - if _, err := w.Write([]byte{byte(f.Network)}); err != nil { - return err - } - if err := binary.Write(w, binary.BigEndian, f.NextHop); err != nil { return err } @@ -563,12 +559,6 @@ func (p *mockIteratorDecoder) DecodeHopIterators(id []byte, } func decodeFwdInfo(r io.Reader, f *hop.ForwardingInfo) error { - var net [1]byte - if _, err := r.Read(net[:]); err != nil { - return err - } - f.Network = hop.Network(net[0]) - if err := binary.Read(r, binary.BigEndian, &f.NextHop); err != nil { return err }