Store capacity and channels in nodes table

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

View File

@@ -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 {