diff options
| -rw-r--r-- | routes/info.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/routes/info.js b/routes/info.js index 017e473a..eda028d2 100644 --- a/routes/info.js +++ b/routes/info.js @@ -6,16 +6,10 @@ export default { let lnchannel; let lnwallet; - const stream = db.scanStream({ - match: "balance:*", - count: 100 - }); - let b = 0; - for await (let keys of stream) { - for (let k of keys) b += parseInt(await db.get(k)); + for await (let k of db.scanIterator({ MATCH: "balance:*" })) { + b += parseInt(await db.get(k)); } - console.log(b); const funds = await ln.listfunds(); lnchannel = parseInt(funds.channels.reduce((a, b) => a + b.channel_sat, 0)); |
