fix: use call to getDefaultClientConfig to get chain config
This commit is contained in:
parent
43ffe2b41c
commit
948d4d6109
|
@ -30,6 +30,7 @@ export function getDefaultClientConfig() {
|
||||||
export function optimisticUpdateFromJSON(update: any): OptimisticUpdate {
|
export function optimisticUpdateFromJSON(update: any): OptimisticUpdate {
|
||||||
return capella.ssz.LightClientOptimisticUpdate.fromJson(update);
|
return capella.ssz.LightClientOptimisticUpdate.fromJson(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function optimisticUpdateVerify(
|
export async function optimisticUpdateVerify(
|
||||||
committee: Uint8Array[],
|
committee: Uint8Array[],
|
||||||
update: OptimisticUpdate,
|
update: OptimisticUpdate,
|
||||||
|
@ -49,7 +50,7 @@ export async function optimisticUpdateVerify(
|
||||||
|
|
||||||
try {
|
try {
|
||||||
assertValidSignedHeader(
|
assertValidSignedHeader(
|
||||||
this.config.chainConfig,
|
getDefaultClientConfig().chainConfig,
|
||||||
committeeFast,
|
committeeFast,
|
||||||
syncAggregate,
|
syncAggregate,
|
||||||
headerBlockRoot,
|
headerBlockRoot,
|
||||||
|
@ -75,6 +76,7 @@ export async function optimisticUpdateVerify(
|
||||||
return { correct: false, reason: (e as Error).message };
|
return { correct: false, reason: (e as Error).message };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deserializePubkeys(pubkeys) {
|
export function deserializePubkeys(pubkeys) {
|
||||||
return pubkeys.map((pk) => bls.PublicKey.fromBytes(pk));
|
return pubkeys.map((pk) => bls.PublicKey.fromBytes(pk));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue