Compare commits

..

4 Commits

5 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,5 @@
# [0.1.0-develop.42](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.41...v0.1.0-develop.42) (2023-07-15)
# [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-07-14) # [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-07-14)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/libethclient", "name": "@lumeweb/libethclient",
"version": "0.1.0-develop.41", "version": "0.1.0-develop.42",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/libethclient", "name": "@lumeweb/libethclient",
"version": "0.1.0-develop.41", "version": "0.1.0-develop.42",
"dependencies": { "dependencies": {
"@chainsafe/as-sha256": "^0.3.1", "@chainsafe/as-sha256": "^0.3.1",
"@chainsafe/bls": "7.1.1", "@chainsafe/bls": "7.1.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/libethsync", "name": "@lumeweb/libethsync",
"version": "0.1.0-develop.41", "version": "0.1.0-develop.42",
"type": "module", "type": "module",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -61,10 +61,7 @@ export default abstract class BaseClient {
} }
public get isSynced() { public get isSynced() {
return ( return this._latestPeriod === this.getCurrentPeriod();
this._latestPeriod === this.getCurrentPeriod() &&
this.getLastBlock() === this.getCurrentBlock()
);
} }
public get store(): IStore { public get store(): IStore {

View File

@ -25,4 +25,14 @@ export default class Client extends BaseClient {
this.beaconUrl = config.beaconUrl; this.beaconUrl = config.beaconUrl;
this.http.defaults.baseURL = this.beaconUrl; this.http.defaults.baseURL = this.beaconUrl;
} }
async sync(): Promise<void> {
await super.sync();
if (!this.booted) {
this.subscribe();
this.booted = true;
}
}
} }