htlcswitch: remove Network type

This commit is contained in:
Elle Mouton authored and Olaoluwa Osuntokun committed 2023-10-06 16:34:47 -07:00
1 parent 77908d6c92
commit 7fa05f92f5
4 files changed
-44

No files matched your search

-10
View File
@@ -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
}