trac-msb 0.0.21 → 0.0.23

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/package.json +1 -1
  2. package/src/index.js +2 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trac-msb",
3
3
  "main": "src/index.js",
4
- "version": "0.0.21",
4
+ "version": "0.0.23",
5
5
  "pear": {
6
6
  "name": "trac-msb",
7
7
  "type": "terminal"
package/src/index.js CHANGED
@@ -64,7 +64,6 @@ export class MainSettlementBus extends ReadyResource {
64
64
  const op = node.value;
65
65
  const postTx = op.value;
66
66
  if (op.type === 'tx') {
67
- console.log('in-verified', crypto.verify(Buffer.from(postTx.tx + postTx.in, 'utf-8'), Buffer.from(postTx.is, 'hex'), Buffer.from(postTx.ipk, 'hex')));
68
67
  if (null === await view.get(op.key) &&
69
68
  sanitizeTransaction(postTx) &&
70
69
  postTx.op === 'post-tx' &&
@@ -141,6 +140,8 @@ export class MainSettlementBus extends ReadyResource {
141
140
 
142
141
  connection.on('data', async (msg) => {
143
142
 
143
+ console.log(Buffer.byteLength(msg));
144
+
144
145
  if(_this.base.isIndexer) return;
145
146
 
146
147
  // TODO: decide if a tx rejection should be responded with
@@ -155,8 +156,6 @@ export class MainSettlementBus extends ReadyResource {
155
156
 
156
157
  const parsedPreTx = JSON.parse(msg);
157
158
 
158
- console.log('in-verified', crypto.verify(Buffer.from(parsedPreTx.tx + parsedPreTx.in, 'utf-8'), Buffer.from(parsedPreTx.is, 'hex'), Buffer.from(parsedPreTx.ipk, 'hex')))
159
-
160
159
  if (sanitizeTransaction(parsedPreTx) &&
161
160
  parsedPreTx.op === 'pre-tx' &&
162
161
  crypto.verify(Buffer.from(parsedPreTx.tx + parsedPreTx.in, 'utf-8'), Buffer.from(parsedPreTx.is, 'hex'), Buffer.from(parsedPreTx.ipk, 'hex')) &&