Commit graph

3 commits

Author SHA1 Message Date
Matt Morehouse
f7c711bdeb
codec: simplify switch cases
Return directly when possible, rather than falling through to return
nil.
2023-05-16 17:30:59 -05:00
Matt Morehouse
29700899e0
codec: remove lnwire.WriteElement calls
There are plans to remove lnwire.WriteElement entirely from LND in favor
of the faster statically-typed encoding functions. Switch to using those
faster functions.
2023-05-16 17:30:59 -05:00
Matt Morehouse
8b239fab7e
clientdb: move WriteElement[s] to own package
Move WriteElement[s] to the codec package so that packages other than
clientdb can use it.

For the codec package, we avoid depending on other packages within Pool
so that no circular dependencies develop. This requires us to move some
of the uintXX casting logic in clientdb/codec.go to call sites.
2023-05-16 17:30:59 -05:00