@@ -52,7 +52,9 @@ function createMarkedSet (ipfs, callback) {
52
52
return cb ( new Error ( `Could not list pinned blocks: ${ err . message } ` ) )
53
53
}
54
54
log ( `Found ${ pins . length } pinned blocks` )
55
- cb ( null , pins . map ( p => new CID ( p . hash ) ) )
55
+ const cids = pins . map ( p => new CID ( p . hash ) )
56
+ // log(' ' + cids.join('\n '))
57
+ cb ( null , cids )
56
58
} ) ,
57
59
58
60
// Blocks used internally by the pinner
@@ -61,6 +63,7 @@ function createMarkedSet (ipfs, callback) {
61
63
return cb ( new Error ( `Could not list pinner internal blocks: ${ err . message } ` ) )
62
64
}
63
65
log ( `Found ${ cids . length } pinner internal blocks` )
66
+ // log(' ' + cids.join('\n '))
64
67
cb ( null , cids )
65
68
} ) ,
66
69
@@ -92,8 +95,10 @@ function getDescendants (ipfs, cid, callback) {
92
95
if ( err ) {
93
96
return callback ( new Error ( `Could not get MFS root descendants from store: ${ err . message } ` ) )
94
97
}
95
- log ( `Found ${ 1 + refs . length } MFS blocks` )
96
- callback ( null , [ cid , ...refs . map ( r => new CID ( r . ref ) ) ] )
98
+ const cids = [ cid , ...refs . map ( r => new CID ( r . ref ) ) ]
99
+ log ( `Found ${ cids . length } MFS blocks` )
100
+ // log(' ' + cids.join('\n '))
101
+ callback ( null , cids )
97
102
} )
98
103
}
99
104
@@ -119,9 +124,10 @@ function deleteUnmarkedBlocks (ipfs, markedSet, blocks, start, callback) {
119
124
}
120
125
}
121
126
122
- const msg = `Marked set has ${ markedSet . size } blocks. Blockstore has ${ blocks . length } blocks. ` +
127
+ const msg = `Marked set has ${ markedSet . size } unique blocks. Blockstore has ${ blocks . length } blocks. ` +
123
128
`Deleting ${ unreferenced . length } blocks.` + ( errCount ? ` (${ errCount } errors)` : '' )
124
129
log ( msg )
130
+ // log(' ' + unreferenced.join('\n '))
125
131
126
132
mapLimit ( unreferenced , BLOCK_RM_CONCURRENCY , ( cid , cb ) => {
127
133
// Delete blocks from blockstore
0 commit comments