|
| 1 | +diff --git a/dist/cjs/blockchain/block.js b/dist/cjs/blockchain/block.js |
| 2 | +index d751a928b5c04a4fac2d9bb3e69df09b8d65187c..5fe2bb034834407e9c8b09bd1b1c6da6e25b1be5 100644 |
| 3 | +--- a/dist/cjs/blockchain/block.js |
| 4 | ++++ b/dist/cjs/blockchain/block.js |
| 5 | +@@ -167,10 +167,17 @@ class Block { |
| 6 | + /** |
| 7 | + * Pop a layer from the storage stack. |
| 8 | + */ popStorageLayer() { |
| 9 | +- _class_private_field_get(this, _storages).pop(); |
| 10 | ++ _class_private_field_get(this, _storages).pop(); |
| 11 | ++ } |
| 12 | ++ resetStorageLayers(targetCount) { |
| 13 | ++ const s = _class_private_field_get(this, _storages); |
| 14 | ++ while (s.length > targetCount) s.pop(); |
| 15 | + } |
| 16 | +- /** |
| 17 | +- * Get storage diff. |
| 18 | ++ get storageLayerCount() { |
| 19 | ++ return _class_private_field_get(this, _storages).length; |
| 20 | ++ } |
| 21 | ++ /** |
| 22 | ++ * Get storage diff. |
| 23 | + */ async storageDiff() { |
| 24 | + const storage = {}; |
| 25 | + for (const layer of _class_private_field_get(this, _storages)){ |
| 26 | +diff --git a/dist/esm/blockchain/block.js b/dist/esm/blockchain/block.js |
| 27 | +index edff7f74638a5c21c5f73c6831708b46eb6a576c..c9b9687bb6cc0169e1cad54bce99efb1c950cc1f 100644 |
| 28 | +--- a/dist/esm/blockchain/block.js |
| 29 | ++++ b/dist/esm/blockchain/block.js |
| 30 | +@@ -157,10 +157,16 @@ import { RemoteStorageLayer, StorageLayer, StorageValueKind } from './storage-la |
| 31 | + /** |
| 32 | + * Pop a layer from the storage stack. |
| 33 | + */ popStorageLayer() { |
| 34 | +- this.#storages.pop(); |
| 35 | ++ this.#storages.pop(); |
| 36 | ++ } |
| 37 | ++ resetStorageLayers(targetCount) { |
| 38 | ++ while (this.#storages.length > targetCount) this.#storages.pop(); |
| 39 | + } |
| 40 | +- /** |
| 41 | +- * Get storage diff. |
| 42 | ++ get storageLayerCount() { |
| 43 | ++ return this.#storages.length; |
| 44 | ++ } |
| 45 | ++ /** |
| 46 | ++ * Get storage diff. |
| 47 | + */ async storageDiff() { |
| 48 | + const storage = {}; |
| 49 | + for (const layer of this.#storages){ |
0 commit comments