fix: fix usage of deserializeSyncCommittee
This commit is contained in:
parent
a5bfec403a
commit
80fdc45ccd
10
src/util.ts
10
src/util.ts
|
@ -9,6 +9,7 @@ import axiosRetry from "axios-retry";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { digest } from "@chainsafe/as-sha256";
|
import { digest } from "@chainsafe/as-sha256";
|
||||||
import { concatBytes } from "@noble/hashes/utils";
|
import { concatBytes } from "@noble/hashes/utils";
|
||||||
|
import { deserializeSyncCommittee } from "@lodestar/light-client/utils";
|
||||||
|
|
||||||
export function getDefaultClientConfig() {
|
export function getDefaultClientConfig() {
|
||||||
const chainConfig = createBeaconConfig(
|
const chainConfig = createBeaconConfig(
|
||||||
|
@ -38,7 +39,14 @@ export async function optimisticUpdateVerify(
|
||||||
const headerBlockRoot = phase0.ssz.BeaconBlockHeader.hashTreeRoot(
|
const headerBlockRoot = phase0.ssz.BeaconBlockHeader.hashTreeRoot(
|
||||||
header.beacon,
|
header.beacon,
|
||||||
);
|
);
|
||||||
const committeeFast = this.deserializeSyncCommittee(committee);
|
|
||||||
|
const committeeFast = deserializeSyncCommittee({
|
||||||
|
pubkeys: committee,
|
||||||
|
aggregatePubkey: bls.PublicKey.aggregate(
|
||||||
|
deserializePubkeys(committee),
|
||||||
|
).toBytes(),
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
assertValidSignedHeader(
|
assertValidSignedHeader(
|
||||||
this.config.chainConfig,
|
this.config.chainConfig,
|
||||||
|
|
Loading…
Reference in New Issue