Commit Graph

4 Commits

Author SHA1 Message Date
Elle Mouton
cc0be0bca2 graph/db: let IsZombieEdge return an error 2025-06-26 10:19:51 +02:00
Elle Mouton
239acb4063 graph/db: validate edge policy TLV data before persisting
In this commit, we start validating the extra opaque data of a channel
edge policy before persisting it. We just check that the data is valid
TLV.

NOTE: we recently [started
validating](1410a0949d)
this at the lnwire level. So really, no new update will reach the DB
layer without this already being checked. But we check it again here so
that the DB API behaves correctly as its own unit.
2025-06-09 08:26:11 +02:00
Elle Mouton
74a4b1922b refactor: move graph related DB code to graph/db from channeldb
This is a pure refactor commit. It moves over all the graph related CRUD
code from `channeldb` to `graph/db`.
2024-11-28 13:36:13 +02:00
Elle Mouton
3365461500 channeldb+graph/db: move net.Addr encode/decode to graph db package
In preparation for moving the graph related schema structs to the graph
package in an upcoming commit, we move these methods to the graph
package. The structs we will move make use of these methods but we still
import them from channeldb so as to keep the ReadElement and
WriteElement helpers working as they do today.
2024-11-28 13:34:08 +02:00