serum-vial
Advanced tools
Comparing version 1.2.6 to 1.2.7
@@ -100,5 +100,11 @@ "use strict"; | ||
}; | ||
const publish = this._initialized === false; | ||
const isInit = this._initialized === false; | ||
if (isInit) { | ||
// initialize with last sequence number | ||
const { HEADER } = serum_1.EVENT_QUEUE_LAYOUT; | ||
const header = HEADER.decode(accountsData.eventQueue); | ||
this._lastSeenSeqNum = header.seqNum; | ||
} | ||
this._initialized = true; | ||
yield this._putInEnvelope(l3Snapshot, publish); | ||
yield this._putInEnvelope(l3Snapshot, isInit); | ||
} | ||
@@ -105,0 +111,0 @@ if (this._initialized === false) { |
{ | ||
"name": "serum-vial", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"engines": { | ||
@@ -51,3 +51,3 @@ "node": ">=15" | ||
"node-fetch": "^2.6.1", | ||
"uWebSockets.js": "git+https://git@github.com/uNetworking/uWebSockets.js.git#v20.4.0", | ||
"uWebSockets.js": "git+https://git@github.com/uNetworking/uWebSockets.js.git#v19.5.0", | ||
"winston": "^3.3.3", | ||
@@ -54,0 +54,0 @@ "ws": "^8.2.3", |
@@ -164,6 +164,13 @@ import { EVENT_QUEUE_LAYOUT, Market, Orderbook, getLayoutVersion } from '@project-serum/serum' | ||
const publish = this._initialized === false | ||
const isInit = this._initialized === false | ||
if (isInit) { | ||
// initialize with last sequence number | ||
const { HEADER } = EVENT_QUEUE_LAYOUT | ||
const header = HEADER.decode(accountsData.eventQueue) as EventQueueHeader | ||
this._lastSeenSeqNum = header.seqNum | ||
} | ||
this._initialized = true | ||
yield this._putInEnvelope(l3Snapshot, publish) | ||
yield this._putInEnvelope(l3Snapshot, isInit) | ||
} | ||
@@ -170,0 +177,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable and can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable and can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
288455
4260