fix remaining random tests

This commit is contained in:
Kevin Jahns
2019-04-09 00:31:17 +02:00
parent e1a9f314a7
commit 12bcc4d080
11 changed files with 153 additions and 137 deletions

View File

@@ -5,7 +5,6 @@ import {
AbstractRef,
AbstractStruct,
createID,
writeID,
addStruct,
Y, StructStore, Transaction, ID // eslint-disable-line
} from '../internals.js'
@@ -58,12 +57,7 @@ export class GC extends AbstractStruct {
*/
write (encoder, offset) {
encoding.writeUint8(encoder, structGCRefNumber)
if (offset === 0) {
writeID(encoder, this.id)
} else {
writeID(encoder, createID(this.id.client, this.id.clock + offset))
}
encoding.writeVarUint(encoder, this._len)
encoding.writeVarUint(encoder, this._len - offset)
}
}