db: update size estimates for forwarding history to be more precise

Note that these estimates are for worst-case values (such as very large
integer values for amounts and htlc indexes). In reality, variable
encoding of smaller values will lead to a smaller footprint.
This commit is contained in:
Carla Kirk-Cohen 2023-10-23 13:42:41 -04:00
parent 9cb88f29a4
commit 38858aabb3
No known key found for this signature in database
GPG key ID: 4CA7FE54A6213C91

6
db.go
View file

@ -82,9 +82,9 @@ const (
// to prevent creation of an ever-growing table.
//
// Justification for value:
// * ~100 bytes per row in the table.
// * Help ourselves to 10MB of disk space
// -> 100_000 entries
// * ~130 bytes per row in the table.
// * Help ourselves to 14MB of disk space
// -> 100_000 entries = 13 MB, plus ~0.8MB for add_time_index.
defaultFwdHistoryLimit = 100_000
)