Skip to content

Instantly share code, notes, and snippets.

@pinheadmz
Created October 8, 2019 13:01
Show Gist options
  • Save pinheadmz/7b1977951212e03685e8a574a020fa2e to your computer and use it in GitHub Desktop.
Save pinheadmz/7b1977951212e03685e8a574a020fa2e to your computer and use it in GitHub Desktop.
diff --git a/lib/blockstore/index.js b/lib/blockstore/index.js
index 7d7a6d21..198e1fba 100644
--- a/lib/blockstore/index.js
+++ b/lib/blockstore/index.js
@@ -17,17 +17,18 @@ const FileBlockStore = require('./file');
*/
exports.create = (options) => {
- if (options.memory) {
+ const location = join(options.prefix, 'blocks');
+
+ if (true) {
return new LevelBlockStore({
network: options.network,
logger: options.logger,
cacheSize: options.cacheSize,
- memory: options.memory
+ memory: false,
+ location: location
});
}
- const location = join(options.prefix, 'blocks');
-
return new FileBlockStore({
network: options.network,
logger: options.logger,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment