Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #81 from orbitdb/feat/optional-pin
Browse files Browse the repository at this point in the history
Feat/optional pin
  • Loading branch information
shamb0t authored Dec 5, 2019
2 parents f1649a8 + 0300372 commit 1d3495f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,14 @@ class Store {
}
}

async _addOperation (data, { onProgressCallback } = {}) {
async _addOperation (data, { onProgressCallback, pin = false } = {}) {
if (this._oplog) {
// check local cache?
if (this.options.syncLocal) {
await this.syncLocal()
}

const entry = await this._oplog.append(data, this.options.referenceCount)
const entry = await this._oplog.append(data, this.options.referenceCount, pin)
this._recalculateReplicationStatus(this.replicationStatus.progress + 1, entry.clock.time)
await this._cache.set(this.localHeadsPath, [entry])
await this._updateIndex()
Expand Down

0 comments on commit 1d3495f

Please sign in to comment.