fix: simplify logic and use LightClientUpdate.fromJson
This commit is contained in:
parent
76e22fa342
commit
17cb00231c
|
@ -61,12 +61,8 @@ export default class Prover implements IProver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < trueCount; i++) {
|
return updates.concat(
|
||||||
updates.push(
|
res.map((u: any) => capella.ssz.LightClientUpdate.fromJson(u.data)),
|
||||||
capella.ssz.LightClientUpdate.deserialize(res[startPeriod + i]),
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return updates;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue