@agoric/internal 0.3.3-dev-9555ae0.0 → 0.3.3-dev-5fa1324.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/internal",
3
- "version": "0.3.3-dev-9555ae0.0+9555ae0",
3
+ "version": "0.3.3-dev-5fa1324.0+5fa1324",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -20,7 +20,7 @@
20
20
  "lint:types": "tsc"
21
21
  },
22
22
  "dependencies": {
23
- "@agoric/base-zone": "0.1.1-dev-9555ae0.0+9555ae0",
23
+ "@agoric/base-zone": "0.1.1-dev-5fa1324.0+5fa1324",
24
24
  "@endo/common": "^1.2.9",
25
25
  "@endo/errors": "^1.2.9",
26
26
  "@endo/far": "^1.1.10",
@@ -34,7 +34,7 @@
34
34
  "jessie.js": "^0.3.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@agoric/cosmic-proto": "0.4.1-dev-9555ae0.0+9555ae0",
37
+ "@agoric/cosmic-proto": "0.4.1-dev-5fa1324.0+5fa1324",
38
38
  "@endo/exo": "^1.5.8",
39
39
  "@endo/init": "^1.1.8",
40
40
  "ava": "^5.3.0",
@@ -60,5 +60,5 @@
60
60
  "typeCoverage": {
61
61
  "atLeast": 93.04
62
62
  },
63
- "gitHead": "9555ae03e9761b77c876197ef70c96380eeae5b4"
63
+ "gitHead": "5fa13245692f735fa957dd74985cc2c8e5d30607"
64
64
  }
@@ -24,6 +24,7 @@ export function makeFakeStorageKit(rootPath: string, rootOptions?: Parameters<ty
24
24
  setValue(value: string): Promise<void>;
25
25
  }>;
26
26
  data: Map<string, string>;
27
+ updateNewCellBlockHeight: (blockHeight?: number) => void;
27
28
  getValues: (path: string) => string[];
28
29
  messages: StorageMessage[];
29
30
  toStorage: ((message: StorageMessage) => string | number | any[] | {
@@ -1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ts","sourceRoot":"","sources":["storage-test-utils.js"],"names":[],"mappings":"AAyBO,yCAHI,MAAM,UACN,MAAM,6GAGC;AAElB;;;GAGG;AACH;;;;;EAEG;;eAMU,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO;mBAEzB,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM;;AA8CjC,8CAtBuB,GAAG,KAAK,GAAG,CAsB+B;AAU1D,6CAHI,MAAM,gBACN,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;oBA+FvC,CAAH;;;;UAwCU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;;sBAd3B,MAAM,KACJ,MAAM,EAAE;;0BAtFP,cAAc;;;0JAAd,cAAc;;;;EAyG7B;AAoBM,4CADO,oBAAoB,CA6BjC;AAUM,yCAPI,OAAO,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,WACvC,oBAAoB,GAAG,cAAc,QACrC,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9D,CAAK;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,EAAE,CAAC,GAAG;IAChD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC,iBAkDL;6BAxGa,UAAU,CAAC,OAAO,kBAAkB,CAAC;;;;;;;;aAIrC,CACT,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,UAAU,EACvB,KAAK,CAAC,EAAE,MAAM,KACX,OAAO;UAKD,MAAM,MAAM,EAAE;;mCAEd,WAAW,GAAG,2BAA2B;qCAxPJ,uBAAuB;iCAOF,uBAAuB;oCAAvB,uBAAuB;gCAAvB,uBAAuB"}
@@ -100,6 +100,14 @@ export const makeFakeStorageKit = (rootPath, rootOptions) => {
100
100
  const resolvedOptions = { sequence: true, ...rootOptions };
101
101
  /** @type {TotalMap<string, string>} */
102
102
  const data = new Map();
103
+ let currentBlockHeight = 0;
104
+
105
+ const updateNewCellBlockHeight = (blockHeight = currentBlockHeight + 1) => {
106
+ blockHeight > currentBlockHeight ||
107
+ Fail`blockHeight ${blockHeight} must be greater than ${currentBlockHeight}`;
108
+ currentBlockHeight = blockHeight;
109
+ };
110
+
103
111
  /** @param {string} prefix */
104
112
  const getChildEntries = prefix => {
105
113
  assert(prefix.endsWith('.'));
@@ -177,10 +185,13 @@ export const makeFakeStorageKit = (rootPath, rootOptions) => {
177
185
  streamCell = undefined;
178
186
  }
179
187
  }
180
- if (streamCell === undefined) {
188
+ if (
189
+ streamCell === undefined ||
190
+ Number(streamCell.blockHeight) !== currentBlockHeight
191
+ ) {
181
192
  streamCell = {
182
- blockHeight: '0',
183
- values: oldVal != null ? [oldVal] : [],
193
+ blockHeight: String(currentBlockHeight),
194
+ values: !streamCell && oldVal != null ? [oldVal] : [],
184
195
  };
185
196
  }
186
197
  streamCell.values.push(value);
@@ -219,6 +230,7 @@ export const makeFakeStorageKit = (rootPath, rootOptions) => {
219
230
  rootNode,
220
231
  // eslint-disable-next-line object-shorthand
221
232
  data: /** @type {Map<string, string>} */ (data),
233
+ updateNewCellBlockHeight,
222
234
  getValues,
223
235
  messages,
224
236
  toStorage,