@ocap/state 1.18.139 → 1.18.140

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.
Files changed (2) hide show
  1. package/lib/states/tx.js +10 -3
  2. package/package.json +9 -9
package/lib/states/tx.js CHANGED
@@ -501,7 +501,7 @@ const getTxReceipts = ({ tx, code }, ctx = {}) => {
501
501
  return merged;
502
502
  };
503
503
 
504
- const create = (context, code = 'OK') => {
504
+ const create = (context, code = 'OK', verifyReceipts = true) => {
505
505
  const { txHash, txTime, tx, totalGas, itxExtras = {} } = context;
506
506
  const itx = decodeAny(tx.itx).value; // we should decode here because `context.itx` maybe changed
507
507
  const typeUrl = fromTypeUrl(tx.itx.typeUrl);
@@ -544,8 +544,15 @@ const create = (context, code = 'OK') => {
544
544
 
545
545
  result.receipts = getTxReceipts(result, context);
546
546
 
547
- if (code === 'OK') {
548
- verifyTxReceipts(result.receipts, typeUrl, context);
547
+ if (code === 'OK' && verifyReceipts) {
548
+ try {
549
+ verifyTxReceipts(result.receipts, typeUrl, context);
550
+ result.receiptsVerified = true;
551
+ } catch (err) {
552
+ console.warn(JSON.stringify(result, null));
553
+ console.error('verifyTxReceipts error', err);
554
+ result.receiptsVerified = false;
555
+ }
549
556
  }
550
557
 
551
558
  // determine gasPaid
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.139",
6
+ "version": "1.18.140",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -18,13 +18,13 @@
18
18
  "coverage": "start-server-and-test start http://127.0.0.1:4001 test:ci"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did": "1.18.139",
22
- "@arcblock/validator": "1.18.139",
23
- "@ocap/contract": "1.18.139",
24
- "@ocap/mcrypto": "1.18.139",
25
- "@ocap/message": "1.18.139",
26
- "@ocap/util": "1.18.139",
27
- "@ocap/wallet": "1.18.139",
21
+ "@arcblock/did": "1.18.140",
22
+ "@arcblock/validator": "1.18.140",
23
+ "@ocap/contract": "1.18.140",
24
+ "@ocap/mcrypto": "1.18.140",
25
+ "@ocap/message": "1.18.140",
26
+ "@ocap/util": "1.18.140",
27
+ "@ocap/wallet": "1.18.140",
28
28
  "bloom-filters": "^1.3.9",
29
29
  "lodash": "^4.17.21"
30
30
  },
@@ -35,5 +35,5 @@
35
35
  "keywords": [],
36
36
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
37
37
  "license": "MIT",
38
- "gitHead": "898afef964741ab25b19cc64cc2b6a3ea833b821"
38
+ "gitHead": "dff40db208094d9c1af520bd10658e2da61fd515"
39
39
  }