@@ -41,7 +41,7 @@ import {
4141} from '@aztec/slasher' ;
4242import { CollectionLimitsConfig , PublicSimulatorConfig } from '@aztec/stdlib/avm' ;
4343import { AztecAddress } from '@aztec/stdlib/aztec-address' ;
44- import { type BlockParameter , type DataInBlock , L2Block , L2BlockHash , type L2BlockSource } from '@aztec/stdlib/block' ;
44+ import { BlockHash , type BlockParameter , type DataInBlock , L2Block , type L2BlockSource } from '@aztec/stdlib/block' ;
4545import type { PublishedCheckpoint } from '@aztec/stdlib/checkpoint' ;
4646import type {
4747 ContractClassPublic ,
@@ -119,7 +119,7 @@ import { NodeMetrics } from './node_metrics.js';
119119 */
120120export class AztecNodeService implements AztecNode , AztecNodeAdmin , Traceable {
121121 private metrics : NodeMetrics ;
122- private initialHeaderHashPromise : Promise < L2BlockHash > | undefined = undefined ;
122+ private initialHeaderHashPromise : Promise < BlockHash > | undefined = undefined ;
123123
124124 // Prevent two snapshot operations to happen simultaneously
125125 private isUploadingSnapshot = false ;
@@ -570,7 +570,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
570570 * @returns The requested block.
571571 */
572572 public async getBlock ( block : BlockParameter ) : Promise < L2Block | undefined > {
573- if ( L2BlockHash . isL2BlockHash ( block ) ) {
573+ if ( BlockHash . isL2BlockHash ( block ) ) {
574574 return this . getBlockByHash ( Fr . fromBuffer ( block . toBuffer ( ) ) ) ;
575575 }
576576 const blockNumber = block === 'latest' ? await this . getBlockNumber ( ) : ( block as BlockNumber ) ;
@@ -692,7 +692,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
692692 public async getPrivateLogsByTags (
693693 tags : SiloedTag [ ] ,
694694 page ?: number ,
695- referenceBlock ?: L2BlockHash ,
695+ referenceBlock ?: BlockHash ,
696696 ) : Promise < TxScopedL2Log [ ] [ ] > {
697697 if ( referenceBlock ) {
698698 const initialBlockHash = await this . #getInitialHeaderHash( ) ;
@@ -713,7 +713,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
713713 contractAddress : AztecAddress ,
714714 tags : Tag [ ] ,
715715 page ?: number ,
716- referenceBlock ?: L2BlockHash ,
716+ referenceBlock ?: BlockHash ,
717717 ) : Promise < TxScopedL2Log [ ] [ ] > {
718718 if ( referenceBlock ) {
719719 const initialBlockHash = await this . #getInitialHeaderHash( ) ;
@@ -915,7 +915,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
915915 }
916916 return {
917917 l2BlockNumber : BlockNumber ( Number ( blockNumber ) ) ,
918- l2BlockHash : L2BlockHash . fromField ( blockHash ) ,
918+ l2BlockHash : BlockHash . fromField ( blockHash ) ,
919919 data : index ,
920920 } ;
921921 } ) ;
@@ -1118,7 +1118,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
11181118 }
11191119
11201120 public async getBlockHeader ( block : BlockParameter = 'latest' ) : Promise < BlockHeader | undefined > {
1121- if ( L2BlockHash . isL2BlockHash ( block ) ) {
1121+ if ( BlockHash . isL2BlockHash ( block ) ) {
11221122 const initialBlockHash = await this . #getInitialHeaderHash( ) ;
11231123 if ( block . equals ( initialBlockHash ) ) {
11241124 // Block source doesn't handle initial header so we need to handle the case separately.
@@ -1409,7 +1409,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
14091409 }
14101410 }
14111411
1412- #getInitialHeaderHash( ) : Promise < L2BlockHash > {
1412+ #getInitialHeaderHash( ) : Promise < BlockHash > {
14131413 if ( ! this . initialHeaderHashPromise ) {
14141414 this . initialHeaderHashPromise = this . worldStateSynchronizer . getCommitted ( ) . getInitialHeader ( ) . hash ( ) ;
14151415 }
@@ -1435,7 +1435,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, Traceable {
14351435 return this . worldStateSynchronizer . getCommitted ( ) ;
14361436 }
14371437
1438- if ( L2BlockHash . isL2BlockHash ( block ) ) {
1438+ if ( BlockHash . isL2BlockHash ( block ) ) {
14391439 const initialBlockHash = await this . #getInitialHeaderHash( ) ;
14401440 if ( block . equals ( initialBlockHash ) ) {
14411441 // Block source doesn't handle initial header so we need to handle the case separately.
0 commit comments