@leofcoin/chain 1.6.13 → 1.6.15

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.
@@ -4437,6 +4437,8 @@ class State extends Contract {
4437
4437
  await globalThis.accountsStore.clear();
4438
4438
  await globalThis.chainStore.clear();
4439
4439
  await globalThis.blockStore.clear();
4440
+ await globalThis.transactionStore.clear();
4441
+ await globalThis.stateStore.clear();
4440
4442
  await globalThis.transactionPoolStore.clear();
4441
4443
  }
4442
4444
  #chainStateHandler;
@@ -4879,7 +4881,7 @@ class VersionControl extends State {
4879
4881
  constructor(config) {
4880
4882
  super(config);
4881
4883
  }
4882
- #currentVersion = '1.2.0';
4884
+ #currentVersion = '1.2.1';
4883
4885
  async #setCurrentVersion() {
4884
4886
  this.version = this.#currentVersion;
4885
4887
  await globalThis.chainStore.put('version', this.version);
@@ -4892,15 +4894,16 @@ class VersionControl extends State {
4892
4894
  console.log(this.version, this.#currentVersion);
4893
4895
  /**
4894
4896
  * protocol version control!
4895
- * note v1 and 1.1 delete everything because of big changes, this is not what we want in the future
4896
- * in the future we want newer nodes to handle the new changes and still confirm old version transactions
4897
- * unless there is a security issue!
4897
+ * Note that before v0.2.0 everything gets deleted because of big changes,
4898
+ * this is not what we want in the future.
4899
+ * In the future we want newer nodes to handle the new changes and still confirm old version transactions
4900
+ * Unless there is a security issue!
4901
+ * But for now the protocoll isn't finished enough and still has to much breaking changes.
4898
4902
  */
4899
- if (semver$1.compare('1.1.1', this.version) === 1) {
4903
+ if (semver$1.compare('1.2.0', this.version) === 1) {
4900
4904
  await this.clearAll();
4901
4905
  }
4902
4906
  if (semver$1.compare(this.#currentVersion, this.version) === 1) {
4903
- // await this.clearAll()
4904
4907
  await this.#setCurrentVersion();
4905
4908
  }
4906
4909
  // if (version)
package/exports/chain.js CHANGED
@@ -804,6 +804,8 @@ class State extends Contract {
804
804
  await globalThis.accountsStore.clear();
805
805
  await globalThis.chainStore.clear();
806
806
  await globalThis.blockStore.clear();
807
+ await globalThis.transactionStore.clear();
808
+ await globalThis.stateStore.clear();
807
809
  await globalThis.transactionPoolStore.clear();
808
810
  }
809
811
  #chainStateHandler;
@@ -1246,7 +1248,7 @@ class VersionControl extends State {
1246
1248
  constructor(config) {
1247
1249
  super(config);
1248
1250
  }
1249
- #currentVersion = '1.2.0';
1251
+ #currentVersion = '1.2.1';
1250
1252
  async #setCurrentVersion() {
1251
1253
  this.version = this.#currentVersion;
1252
1254
  await globalThis.chainStore.put('version', this.version);
@@ -1259,15 +1261,16 @@ class VersionControl extends State {
1259
1261
  console.log(this.version, this.#currentVersion);
1260
1262
  /**
1261
1263
  * protocol version control!
1262
- * note v1 and 1.1 delete everything because of big changes, this is not what we want in the future
1263
- * in the future we want newer nodes to handle the new changes and still confirm old version transactions
1264
- * unless there is a security issue!
1264
+ * Note that before v0.2.0 everything gets deleted because of big changes,
1265
+ * this is not what we want in the future.
1266
+ * In the future we want newer nodes to handle the new changes and still confirm old version transactions
1267
+ * Unless there is a security issue!
1268
+ * But for now the protocoll isn't finished enough and still has to much breaking changes.
1265
1269
  */
1266
- if (semver.compare('1.1.1', this.version) === 1) {
1270
+ if (semver.compare('1.2.0', this.version) === 1) {
1267
1271
  await this.clearAll();
1268
1272
  }
1269
1273
  if (semver.compare(this.#currentVersion, this.version) === 1) {
1270
- // await this.clearAll()
1271
1274
  await this.#setCurrentVersion();
1272
1275
  }
1273
1276
  // if (version)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.6.13",
3
+ "version": "1.6.15",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {