@acala-network/chopsticks-core 0.14.1 → 0.14.2-1

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.
@@ -211,7 +211,7 @@ class TxPool {
211
211
  horizontalMessages,
212
212
  unsafeBlockHeight
213
213
  });
214
- // with the latest message queue, messages are processed in the upcoming block
214
+ // with the latest message queue, messages could be processed in the upcoming block
215
215
  if (!_class_private_field_get(this, _chain).processQueuedMessages) return;
216
216
  // if block was built without horizontal or downward messages then skip
217
217
  if (_lodash.default.isEmpty(horizontalMessages) && _lodash.default.isEmpty(downwardMessages)) return;
@@ -226,7 +226,7 @@ class TxPool {
226
226
  const rawValue = await _class_private_field_get(this, _chain).head.get(key);
227
227
  if (!rawValue) continue;
228
228
  const message = meta.registry.createType('PalletMessageQueueBookState', (0, _toU8a.hexToU8a)(rawValue)).toJSON();
229
- if (message.size > 0) {
229
+ if (message.size > 0 && message.end > message.begin) {
230
230
  logger.info('Queued messages detected, building a new block');
231
231
  // build a new block to process the queued messages
232
232
  await _class_private_field_get(this, _chain).newBlock();
@@ -156,7 +156,7 @@ export class TxPool {
156
156
  horizontalMessages,
157
157
  unsafeBlockHeight
158
158
  });
159
- // with the latest message queue, messages are processed in the upcoming block
159
+ // with the latest message queue, messages could be processed in the upcoming block
160
160
  if (!this.#chain.processQueuedMessages) return;
161
161
  // if block was built without horizontal or downward messages then skip
162
162
  if (_.isEmpty(horizontalMessages) && _.isEmpty(downwardMessages)) return;
@@ -171,7 +171,7 @@ export class TxPool {
171
171
  const rawValue = await this.#chain.head.get(key);
172
172
  if (!rawValue) continue;
173
173
  const message = meta.registry.createType('PalletMessageQueueBookState', hexToU8a(rawValue)).toJSON();
174
- if (message.size > 0) {
174
+ if (message.size > 0 && message.end > message.begin) {
175
175
  logger.info('Queued messages detected, building a new block');
176
176
  // build a new block to process the queued messages
177
177
  await this.#chain.newBlock();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-core",
3
- "version": "0.14.1",
3
+ "version": "0.14.2-1",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -11,7 +11,7 @@
11
11
  "depcheck": "npx depcheck"
12
12
  },
13
13
  "dependencies": {
14
- "@acala-network/chopsticks-executor": "0.14.1",
14
+ "@acala-network/chopsticks-executor": "0.14.2-1",
15
15
  "@polkadot/rpc-provider": "^12.3.1",
16
16
  "@polkadot/types": "^12.3.1",
17
17
  "@polkadot/types-codec": "^12.3.1",