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.
- package/package.json +1 -1
- package/src/index.js +2 -3
package/package.json
CHANGED
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')) &&
|