refactor: store optimistic update back into _latestOptimisticUpdate with a getter.
This commit is contained in:
parent
a7786fa21c
commit
b3e5607132
|
@ -129,6 +129,10 @@ export default abstract class BaseClient {
|
||||||
console.error(`Invalid Optimistic Update: ${verify.reason}`);
|
console.error(`Invalid Optimistic Update: ${verify.reason}`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._latestOptimisticUpdate =
|
||||||
|
capella.ssz.LightClientOptimisticUpdate.serialize(update);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Optimistic update verified for slot ${update.attestedHeader.beacon.slot}`,
|
`Optimistic update verified for slot ${update.attestedHeader.beacon.slot}`,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue