Store capacity and channels in nodes table

This commit is contained in:
softsimon committed 2022-08-26 02:31:14 +04:00
1 parent 3481008a7f
commit cf662ca070
3 files changed
+19 -2

No files matched your search

@@ -279,6 +279,17 @@ class LightningStatsImporter {
nodeStats[public_key].capacity,
nodeStats[public_key].channels,
]);
if (!isHistorical) {
await DB.query(
`UPDATE nodes SET capacity = ?, channels = ? WHERE public_key = ?`,
[
nodeStats[public_key].capacity,
nodeStats[public_key].channels,
public_key,
]
);
}
}
return {