fix: if we are within 1 period of getCurrentPeriod manually call sync actions, otherwise call parent sync
This commit is contained in:
parent
e6ad5a13ed
commit
65002190b8
|
@ -50,10 +50,14 @@ export default class Client extends BaseClient {
|
|||
checkpoint.attestedHeader.beacon.slot,
|
||||
);
|
||||
this.latestCommittee = checkpoint.nextSyncCommittee.pubkeys;
|
||||
if (this._latestPeriod + 1 === this.getCurrentPeriod()) {
|
||||
this.booted = true;
|
||||
this.emit("synced");
|
||||
|
||||
await this.getLatestExecution(false);
|
||||
} else {
|
||||
await super.sync();
|
||||
}
|
||||
}
|
||||
|
||||
public async rpcCall(method: string, params: any) {
|
||||
|
|
Loading…
Reference in New Issue