Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 8993ba67d4 | |
Derrick Hammer | fd3d5facac | |
Derrick Hammer | 09637948e7 |
|
@ -1,3 +1,10 @@
|
||||||
|
# [0.1.0-develop.64](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.63...v0.1.0-develop.64) (2023-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* wrap sync in try/catch and unlock mutex in a finally ([0963794](https://git.lumeweb.com/LumeWeb/libethsync/commit/09637948e71e88c66b9e40389b4a46c60659f6e3))
|
||||||
|
|
||||||
# [0.1.0-develop.63](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.62...v0.1.0-develop.63) (2023-10-24)
|
# [0.1.0-develop.63](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.62...v0.1.0-develop.63) (2023-10-24)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libethsync",
|
"name": "@lumeweb/libethsync",
|
||||||
"version": "0.1.0-develop.63",
|
"version": "0.1.0-develop.64",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lumeweb/libethsync",
|
"name": "@lumeweb/libethsync",
|
||||||
"version": "0.1.0-develop.63",
|
"version": "0.1.0-develop.64",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chainsafe/as-sha256": "^0.3.1",
|
"@chainsafe/as-sha256": "^0.3.1",
|
||||||
"@chainsafe/bls": "7.1.1",
|
"@chainsafe/bls": "7.1.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/libethsync",
|
"name": "@lumeweb/libethsync",
|
||||||
"version": "0.1.0-develop.63",
|
"version": "0.1.0-develop.64",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -170,6 +170,7 @@ export default abstract class BaseClient extends EventEmitter {
|
||||||
protected async _sync() {
|
protected async _sync() {
|
||||||
await this.syncMutex.acquire();
|
await this.syncMutex.acquire();
|
||||||
|
|
||||||
|
try {
|
||||||
const currentPeriod = this.getCurrentPeriod();
|
const currentPeriod = this.getCurrentPeriod();
|
||||||
if (currentPeriod > this._latestPeriod) {
|
if (currentPeriod > this._latestPeriod) {
|
||||||
if (!this.booted) {
|
if (!this.booted) {
|
||||||
|
@ -180,9 +181,12 @@ export default abstract class BaseClient extends EventEmitter {
|
||||||
this._latestPeriod = currentPeriod;
|
this._latestPeriod = currentPeriod;
|
||||||
this.emit("synced");
|
this.emit("synced");
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
} finally {
|
||||||
this.syncMutex.release();
|
this.syncMutex.release();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected async subscribe(callback?: (ei: ExecutionInfo) => void) {
|
protected async subscribe(callback?: (ei: ExecutionInfo) => void) {
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
|
|
Loading…
Reference in New Issue