Skip to content

Commit

Permalink
chore: minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Aug 6, 2018
1 parent 97ba98e commit c830593
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/default-datastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

// Default configuration for the datastore spec in node.js
module.exports = {
StorageGCWatermark: 90,
GCPeriod: '1h',
BloomFilterSize: 0,
Spec: {
type: 'mount',
mounts: [
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ function buildOptions (_options) {
return options
}

// TODO this should come from js-ipfs instead
function buildConfig (_config) {
_config.datastore = Object.assign({}, defaultDatastore, _get(_config, 'datastore', {}))

Expand Down
4 changes: 4 additions & 0 deletions src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ module.exports = (store) => {
return callback(err)
}
log('comparing version: %s and %s', version, expected)

// Version 6 and 7 are the same
expected = expected === 6 ? expected = 7 : expected

if (version !== expected) {
return callback(new Error(`version mismatch: expected v${expected}, found v${version}`))
}
Expand Down

0 comments on commit c830593

Please sign in to comment.