Compare commits
2 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 000d03e8a9 | |
Derrick Hammer | 7075966227 |
|
@ -1,3 +1,10 @@
|
|||
# [0.1.0-develop.49](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.48...v0.1.0-develop.49) (2023-07-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add try/catch with mutex release on optimisticUpdateCallback ([7075966](https://git.lumeweb.com/LumeWeb/libethsync/commit/7075966227515151490639b0f22a804d6e3b2583))
|
||||
|
||||
# [0.1.0-develop.48](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.47...v0.1.0-develop.48) (2023-07-24)
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libethsync",
|
||||
"version": "0.1.0-develop.48",
|
||||
"version": "0.1.0-develop.49",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libethsync",
|
||||
"version": "0.1.0-develop.48",
|
||||
"version": "0.1.0-develop.49",
|
||||
"dependencies": {
|
||||
"@chainsafe/as-sha256": "^0.3.1",
|
||||
"@chainsafe/bls": "7.1.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libethsync",
|
||||
"version": "0.1.0-develop.48",
|
||||
"version": "0.1.0-develop.49",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -86,6 +86,7 @@ export default abstract class BaseClient extends EventEmitter {
|
|||
public getCurrentBlock(): number {
|
||||
return getCurrentSlot(this.config.chainConfig, this.genesisTime);
|
||||
}
|
||||
|
||||
public getLastBlock(): number | null {
|
||||
if (this._latestOptimisticUpdate) {
|
||||
return capella.ssz.LightClientOptimisticUpdate.deserialize(
|
||||
|
@ -227,7 +228,13 @@ export default abstract class BaseClient extends EventEmitter {
|
|||
}
|
||||
|
||||
await this.optimisticMutex.acquire();
|
||||
const update = await this.options.optimisticUpdateCallback();
|
||||
let update: OptimisticUpdate;
|
||||
try {
|
||||
update = await this.options.optimisticUpdateCallback();
|
||||
} catch (e) {
|
||||
this.optimisticMutex.release();
|
||||
throw e;
|
||||
}
|
||||
|
||||
const verify = await optimisticUpdateVerify(
|
||||
this.latestCommittee as Uint8Array[],
|
||||
|
|
Loading…
Reference in New Issue