fix: further chainConfig fixes

This commit is contained in:
Derrick Hammer 2023-07-11 03:16:39 -04:00
parent 82f4d702eb
commit 8b1191165a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 2 deletions

View File

@ -41,6 +41,8 @@ export async function optimisticUpdateVerify(
header.beacon, header.beacon,
); );
const chainConfig = getDefaultClientConfig().chainConfig;
const committeeFast = deserializeSyncCommittee({ const committeeFast = deserializeSyncCommittee({
pubkeys: committee, pubkeys: committee,
aggregatePubkey: bls.PublicKey.aggregate( aggregatePubkey: bls.PublicKey.aggregate(
@ -50,7 +52,7 @@ export async function optimisticUpdateVerify(
try { try {
assertValidSignedHeader( assertValidSignedHeader(
getDefaultClientConfig().chainConfig, chainConfig,
committeeFast, committeeFast,
syncAggregate, syncAggregate,
headerBlockRoot, headerBlockRoot,
@ -66,7 +68,7 @@ export async function optimisticUpdateVerify(
return { correct: false, reason: "insufficient signatures" }; return { correct: false, reason: "insufficient signatures" };
} }
if (!this.isValidLightClientHeader(this.config.chainConfig, header)) { if (!this.isValidLightClientHeader(chainConfig, header)) {
return { correct: false, reason: "invalid header" }; return { correct: false, reason: "invalid header" };
} }