lnwire: add *OpaqueAddrs case in WriteElements

And then expand the chanbackup unit tests to cover such a case.
This commit is contained in:
Elle Mouton
2025-05-23 16:14:47 +02:00
parent a15489159a
commit 412e05f85f
4 changed files with 20 additions and 3 deletions

View File

@@ -348,6 +348,11 @@ func WriteElement(w *bytes.Buffer, element interface{}) error {
return err
}
case *OpaqueAddrs:
if err := WriteOpaqueAddrs(w, e); err != nil {
return err
}
case []net.Addr:
// First, we'll encode all the addresses into an intermediate
// buffer. We need to do this in order to compute the total