Skip to content

Commit e2c0869

Browse files
pass fork option to copy from
1 parent 73ba6ef commit e2c0869

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/core.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ module.exports = class Core {
224224
return false
225225
}
226226

227-
async copyFrom (src, signature, { length = src.tree.length, additional = [] } = {}) {
227+
async copyFrom (src, signature, { length = src.tree.length, fork = src.tree.fork, additional = [] } = {}) {
228228
await this._mutex.lock()
229229

230230
try {
@@ -334,7 +334,7 @@ module.exports = class Core {
334334

335335
await batch.commit()
336336

337-
this.tree.fork = src.tree.fork
337+
this.tree.fork = fork
338338

339339
this.header.tree.length = this.tree.length
340340
this.header.tree.rootHash = this.tree.hash()

0 commit comments

Comments
 (0)