refactor: store optimistic update back into _latestOptimisticUpdate with a getter.

This commit is contained in:
Derrick Hammer 2023-07-13 03:13:22 -04:00
parent a7786fa21c
commit b3e5607132
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -129,6 +129,10 @@ export default abstract class BaseClient {
console.error(`Invalid Optimistic Update: ${verify.reason}`);
return null;
}
this._latestOptimisticUpdate =
capella.ssz.LightClientOptimisticUpdate.serialize(update);
console.log(
`Optimistic update verified for slot ${update.attestedHeader.beacon.slot}`,
);