@leofcoin/chain 1.5.62 → 1.5.63

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.
@@ -4933,7 +4933,6 @@ class Chain extends VersionControl {
4933
4933
  }
4934
4934
  }
4935
4935
  async #addBlock(block) {
4936
- console.log({ block });
4937
4936
  const blockMessage = await new BlockMessage(block);
4938
4937
  const hash = await blockMessage.hash();
4939
4938
  await Promise.all(blockMessage.decoded.transactions
@@ -36,6 +36,7 @@ let nativeCalls = 0;
36
36
  let nativeBurns = 0;
37
37
  let nativeMints = 0;
38
38
  let nativeTransfers = 0;
39
+ let totalTransactions = 0;
39
40
 
40
41
  let blocks = [];
41
42
  let contracts = {};
@@ -174,6 +175,7 @@ _.init = async (message) => {
174
175
  if (method === 'mint') nativeMints += 1;
175
176
  if (method === 'transfer') nativeTransfers += 1;
176
177
  }
178
+ totalTransactions += 1;
177
179
 
178
180
  worker.postMessage({
179
181
  type: 'transactionLoaded',
@@ -284,6 +286,9 @@ worker.onmessage(({ id, type, input }) => {
284
286
  case 'latestTransactions':
285
287
  respond(id, latestTransactions);
286
288
  break
289
+ case 'totalTransactions':
290
+ respond(id, totalTransactions);
291
+ break
287
292
  case 'has':
288
293
  respond(id, has(input.address));
289
294
  break
package/exports/chain.js CHANGED
@@ -1344,7 +1344,6 @@ class Chain extends VersionControl {
1344
1344
  }
1345
1345
  }
1346
1346
  async #addBlock(block) {
1347
- console.log({ block });
1348
1347
  const blockMessage = await new BlockMessage(block);
1349
1348
  const hash = await blockMessage.hash();
1350
1349
  await Promise.all(blockMessage.decoded.transactions
@@ -36,6 +36,7 @@ let nativeCalls = 0;
36
36
  let nativeBurns = 0;
37
37
  let nativeMints = 0;
38
38
  let nativeTransfers = 0;
39
+ let totalTransactions = 0;
39
40
 
40
41
  let blocks = [];
41
42
  let contracts = {};
@@ -174,6 +175,7 @@ _.init = async (message) => {
174
175
  if (method === 'mint') nativeMints += 1;
175
176
  if (method === 'transfer') nativeTransfers += 1;
176
177
  }
178
+ totalTransactions += 1;
177
179
 
178
180
  worker.postMessage({
179
181
  type: 'transactionLoaded',
@@ -284,6 +286,9 @@ worker.onmessage(({ id, type, input }) => {
284
286
  case 'latestTransactions':
285
287
  respond(id, latestTransactions);
286
288
  break
289
+ case 'totalTransactions':
290
+ respond(id, totalTransactions);
291
+ break
287
292
  case 'has':
288
293
  respond(id, has(input.address));
289
294
  break
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.5.62",
3
+ "version": "1.5.63",
4
4
  "description": "Official javascript implementation",
5
5
  "exports": {
6
6
  "./node": {