File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { aggregateSignatures , Signature } from "@chainsafe/blst" ;
2- import { BitArray , toHexString } from "@chainsafe/ssz" ;
2+ import { BitArray } from "@chainsafe/ssz" ;
33import {
44 ForkName ,
55 ForkSeq ,
Original file line number Diff line number Diff line change @@ -202,7 +202,8 @@ export function getAttDataFromSignedAggregateAndProofElectra(data: Uint8Array):
202202 if ( data . length < endIndex + SIGNATURE_SIZE + COMMITTEE_BITS_SIZE ) {
203203 return null ;
204204 }
205- return toBase64 ( data . subarray ( startIndex , endIndex ) ) ;
205+ attDataBuf . set ( data . subarray ( startIndex , endIndex ) ) ;
206+ return attDataBuf . toString ( "base64" ) ;
206207}
207208
208209/**
@@ -217,7 +218,8 @@ export function getCommitteeBitsFromSignedAggregateAndProofElectra(data: Uint8Ar
217218 return null ;
218219 }
219220
220- return toBase64 ( data . subarray ( startIndex , endIndex ) ) ;
221+ committeeBitsDataBuf . set ( data . subarray ( startIndex , endIndex ) ) ;
222+ return committeeBitsDataBuf . toString ( "base64" ) ;
221223}
222224
223225/**
You can’t perform that action at this time.
0 commit comments