graph/db: fix ChanUpdate message/channel flag bug

Here we start using the newly added message_flags and channel_flags
columns of the channel_policies table. The test added previoulsy to
demonstrate the bug is now updated to show that the bug has been fixed.
This commit is contained in:
Elle Mouton committed 2025-07-01 10:12:54 +02:00
1 parent 4a05e5a226
commit e4137a3f14
3 files changed
+47 -47

No files matched your search

+7
View File
@@ -68,3 +68,10 @@ func SQLTime(t time.Time) sql.NullTime {
Valid: true,
}
}
// ExtractSqlInt16 turns a NullInt16 into a numerical type. This can be useful
// when reading directly from the database, as this function handles extracting
// the inner value from the "option"-like struct.
func ExtractSqlInt16[T constraints.Integer](num sql.NullInt16) T {
return T(num.Int16)
}