@@ -1061,7 +1061,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
10611061 ) ;
10621062
10631063 // Build a map from block number to block hash
1064- const blockNumberToHash = new Map < BlockNumber , Fr > ( ) ;
1064+ const blockNumberToHash = new Map < BlockNumber , BlockHash > ( ) ;
10651065 for ( let i = 0 ; i < uniqueBlockNumbers . length ; i ++ ) {
10661066 const blockHash = blockHashes [ i ] ;
10671067 if ( blockHash === undefined ) {
@@ -1079,13 +1079,13 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
10791079 if ( blockNumber === undefined ) {
10801080 throw new Error ( `Block number not found for leaf index ${ index } in tree ${ MerkleTreeId [ treeId ] } ` ) ;
10811081 }
1082- const blockHash = blockNumberToHash . get ( blockNumber ) ;
1083- if ( blockHash === undefined ) {
1082+ const l2BlockHash = blockNumberToHash . get ( blockNumber ) ;
1083+ if ( l2BlockHash === undefined ) {
10841084 throw new Error ( `Block hash not found for block number ${ blockNumber } ` ) ;
10851085 }
10861086 return {
10871087 l2BlockNumber : blockNumber ,
1088- l2BlockHash : new BlockHash ( blockHash ) ,
1088+ l2BlockHash,
10891089 data : index ,
10901090 } ;
10911091 } ) ;
@@ -1741,7 +1741,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
17411741 // Double-check world-state synced to the same block hash as was requested
17421742 if ( BlockHash . isBlockHash ( block ) ) {
17431743 const blockHash = await snapshot . getLeafValue ( MerkleTreeId . ARCHIVE , BigInt ( blockNumber ) ) ;
1744- if ( ! blockHash || ! new BlockHash ( blockHash ) . equals ( block ) ) {
1744+ if ( ! blockHash || ! block . equals ( blockHash ) ) {
17451745 throw new Error (
17461746 `Block hash ${ block . toString ( ) } not found in world state at block number ${ blockNumber } . If the node API has been queried with anchor block hash possibly a reorg has occurred.` ,
17471747 ) ;
0 commit comments