We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac2d5d0 commit e31c04cCopy full SHA for e31c04c
lib/driveWatcher.js
@@ -53,11 +53,11 @@ class DriveWatcher extends EventEmitter {
53
var peers = 0
54
for (const [path, drive] of this.drivesByPath) {
55
const driveStats = await drive.stats()
56
- for (const { path, metadata } of driveStats.stats) {
57
- if (path !== '/') continue
58
- downloaded += metadata.downloadedBlocks
59
- total += metadata.totalBlocks
60
- peers = metadata.peers
+ for (const { path, content } of driveStats.stats) {
+ if (path !== '/' || !content) continue
+ downloaded += content.downloadedBlocks
+ total += content.totalBlocks
+ peers = content.peers
61
}
62
63
this.emit('stats', { total, downloaded, peers })
0 commit comments