graph/db: set policy version for cache load

Ensure policies loaded for graph cache reconstruction are tagged as v1.
This commit is contained in:
Elle Mouton committed 2026-02-13 07:21:24 +02:00
1 parent a73c45946b
commit bd215b1a7d
1 file changed
+2
+2
View File
@@ -4822,6 +4822,7 @@ func extractChannelPolicies(row any) (*sqlc.GraphChannelPolicy,
case sqlc.ListChannelsWithPoliciesForCachePaginatedRow:
if r.Policy1Timelock.Valid {
policy1 = &sqlc.GraphChannelPolicy{
Version: int16(lnwire.GossipVersion1),
Timelock: r.Policy1Timelock.Int32,
FeePpm: r.Policy1FeePpm.Int64,
BaseFeeMsat: r.Policy1BaseFeeMsat.Int64,
@@ -4838,6 +4839,7 @@ func extractChannelPolicies(row any) (*sqlc.GraphChannelPolicy,
}
if r.Policy2Timelock.Valid {
policy2 = &sqlc.GraphChannelPolicy{
Version: int16(lnwire.GossipVersion1),
Timelock: r.Policy2Timelock.Int32,
FeePpm: r.Policy2FeePpm.Int64,
BaseFeeMsat: r.Policy2BaseFeeMsat.Int64,