New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@telosnetwork/hyperion-sequential-reader

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@telosnetwork/hyperion-sequential-reader - npm Package Compare versions

Comparing version 1.2.7-rc11 to 1.2.7-rc12

2

lib/esm/reader.d.ts

@@ -13,2 +13,3 @@ /// <reference types="node" />

irreversibleOnly?: boolean;
fetchBlock?: boolean;
fetchTraces?: boolean;

@@ -95,2 +96,3 @@ fetchDeltas?: boolean;

private irreversibleOnly;
private fetchBlock;
private fetchTraces;

@@ -97,0 +99,0 @@ private fetchDeltas;

73

lib/esm/reader.js

@@ -59,2 +59,3 @@ import { EventEmitter } from "events";

irreversibleOnly;
fetchBlock;
fetchTraces;

@@ -68,8 +69,8 @@ fetchDeltas;

this.options = options;
this.logLevel = options.logLevel || 'warning';
this.logLevel = options.logLevel ?? 'warning';
this.shipApi = options.shipApi;
this.max_payload_mb = options.maxPayloadMb || 256;
this.maxMsgsInFlight = options.maxMsgsInFlight || 100;
this.max_payload_mb = options.maxPayloadMb ?? 256;
this.maxMsgsInFlight = options.maxMsgsInFlight ?? 100;
this.ship = new StateHistorySocket(this.shipApi, this.max_payload_mb);
this.blockHistorySize = options.blockHistorySize || HIST_TIME;
this.blockHistorySize = options.blockHistorySize ?? HIST_TIME;
this.blockHistory = new OrderedSet(this.blockHistorySize);

@@ -83,12 +84,13 @@ // placeholder store

this.createWorkers({
poolSize: options.poolSize || 1,
logLevel: options.workerLogLevel || 'warning'
poolSize: options.poolSize ?? 1,
logLevel: options.workerLogLevel ?? 'warning'
});
this.irreversibleOnly = options.irreversibleOnly || false;
this.fetchDeltas = options.fetchDeltas || true;
this.fetchTraces = options.fetchTraces || true;
this.startBlock = options.startBlock || -1;
this.irreversibleOnly = options.irreversibleOnly ?? false;
this.fetchBlock = options.fetchBlock ?? true;
this.fetchDeltas = options.fetchDeltas ?? true;
this.fetchTraces = options.fetchTraces ?? true;
this.startBlock = options.startBlock ?? -1;
this.lastEmittedBlock = this.startBlock - 1;
this.nextBlockRequested = this.startBlock;
this.endBlock = options.endBlock || -1;
this.endBlock = options.endBlock ?? -1;
if (!options.endBlock && !options.startBlock) {

@@ -98,3 +100,3 @@ this.blockConcurrency = 1;

else {
this.blockConcurrency = options.blockConcurrency || 5;
this.blockConcurrency = options.blockConcurrency ?? 5;
}

@@ -318,3 +320,3 @@ if (options.inputQueueLimit) {

irreversible_only: this.irreversibleOnly,
fetch_block: true,
fetch_block: this.fetchBlock,
fetch_traces: this.fetchTraces,

@@ -359,2 +361,5 @@ fetch_deltas: this.fetchDeltas,

this.blockHistory.add(blockNum);
const extendedActions = [];
const extendedDeltas = [];
let blockHeader = null;
if (resultElement.block && blockNum) {

@@ -366,3 +371,3 @@ const block = Serializer.decode({

});
const blockHeader = Serializer.objectify({
blockHeader = Serializer.objectify({
timestamp: block.timestamp,

@@ -380,3 +385,2 @@ producer: block.producer,

});
const extendedDeltas = [];
if (resultElement.deltas) {

@@ -455,3 +459,2 @@ const deltaArrays = Serializer.decode({

}
const extendedActions = [];
if (resultElement.traces) {

@@ -521,22 +524,22 @@ const traces = Serializer.decode({

}
const nBlock = {
ready: false,
blockInfo,
blockHeader,
counters: {
actions: 0,
deltas: 0
},
targets: {
actions: extendedActions.length,
deltas: extendedDeltas.length,
},
deltas: extendedDeltas,
actions: extendedActions,
createdAt: process.hrtime.bigint()
};
this.blockCollector.set(blockNum, nBlock);
if (extendedDeltas.length == 0 && extendedActions.length == 0)
this.checkBlock(nBlock);
}
const nBlock = {
ready: false,
blockInfo,
blockHeader,
counters: {
actions: 0,
deltas: 0
},
targets: {
actions: extendedActions.length,
deltas: extendedDeltas.length,
},
deltas: extendedDeltas,
actions: extendedActions,
createdAt: process.hrtime.bigint()
};
this.blockCollector.set(blockNum, nBlock);
if (extendedDeltas.length == 0 && extendedActions.length == 0)
this.checkBlock(nBlock);
}

@@ -543,0 +546,0 @@ createWorkers(param) {

@@ -15,2 +15,5 @@ import { HyperionSequentialReader } from "../reader.js";

endBlock: -1,
fetchBlock: false,
fetchTraces: false,
fetchDeltas: false,
actionWhitelist: {

@@ -17,0 +20,0 @@ 'eosio.token': ['transfer'],

{
"name": "@telosnetwork/hyperion-sequential-reader",
"repository": "telosnetwork/hyperion-sequential-reader",
"version": "1.2.7-rc11",
"version": "1.2.7-rc12",
"description": "",

@@ -6,0 +6,0 @@ "main": "./lib/esm/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc