@@ -97,32 +97,32 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch
97
97
} ) ;
98
98
99
99
describe ( 'getSynchPoint' , ( ) => {
100
- it ( 'returns 0n if no blocks have been added' , async ( ) => {
100
+ it ( 'returns undefined if no blocks have been added' , async ( ) => {
101
101
await expect ( store . getSynchPoint ( ) ) . resolves . toEqual ( {
102
- blocksSynchedTo : 0n ,
103
- messagesSynchedTo : 0n ,
104
- blockBodiesSynchedTo : 0n ,
105
- provenLogsSynchedTo : 0n ,
102
+ blocksSynchedTo : undefined ,
103
+ messagesSynchedTo : undefined ,
104
+ blockBodiesSynchedTo : undefined ,
105
+ provenLogsSynchedTo : undefined ,
106
106
} satisfies ArchiverL1SynchPoint ) ;
107
107
} ) ;
108
108
109
109
it ( 'returns the L1 block number in which the most recent L2 block was published' , async ( ) => {
110
110
await store . addBlocks ( blocks ) ;
111
111
await expect ( store . getSynchPoint ( ) ) . resolves . toEqual ( {
112
112
blocksSynchedTo : 19n ,
113
- messagesSynchedTo : 0n ,
114
- blockBodiesSynchedTo : 0n ,
115
- provenLogsSynchedTo : 0n ,
113
+ messagesSynchedTo : undefined ,
114
+ blockBodiesSynchedTo : undefined ,
115
+ provenLogsSynchedTo : undefined ,
116
116
} satisfies ArchiverL1SynchPoint ) ;
117
117
} ) ;
118
118
119
119
it ( 'returns the L1 block number in which the most recent L2 block body was published' , async ( ) => {
120
120
await store . addBlockBodies ( blockBodies ) ;
121
121
await expect ( store . getSynchPoint ( ) ) . resolves . toEqual ( {
122
- blocksSynchedTo : 0n ,
123
- messagesSynchedTo : 0n ,
122
+ blocksSynchedTo : undefined ,
123
+ messagesSynchedTo : undefined ,
124
124
blockBodiesSynchedTo : blockBodies . lastProcessedL1BlockNumber ,
125
- provenLogsSynchedTo : 0n ,
125
+ provenLogsSynchedTo : undefined ,
126
126
} satisfies ArchiverL1SynchPoint ) ;
127
127
} ) ;
128
128
@@ -132,19 +132,19 @@ export function describeArchiverDataStore(testName: string, getStore: () => Arch
132
132
retrievedData : [ new InboxLeaf ( 0n , 0n , Fr . ZERO ) ] ,
133
133
} ) ;
134
134
await expect ( store . getSynchPoint ( ) ) . resolves . toEqual ( {
135
- blocksSynchedTo : 0n ,
135
+ blocksSynchedTo : undefined ,
136
136
messagesSynchedTo : 1n ,
137
- blockBodiesSynchedTo : 0n ,
138
- provenLogsSynchedTo : 0n ,
137
+ blockBodiesSynchedTo : undefined ,
138
+ provenLogsSynchedTo : undefined ,
139
139
} satisfies ArchiverL1SynchPoint ) ;
140
140
} ) ;
141
141
142
142
it ( 'returns the L1 block number that most recently logged a proven block' , async ( ) => {
143
143
await store . setProvenL2BlockNumber ( { lastProcessedL1BlockNumber : 3n , retrievedData : 5 } ) ;
144
144
await expect ( store . getSynchPoint ( ) ) . resolves . toEqual ( {
145
- blocksSynchedTo : 0n ,
146
- messagesSynchedTo : 0n ,
147
- blockBodiesSynchedTo : 0n ,
145
+ blocksSynchedTo : undefined ,
146
+ messagesSynchedTo : undefined ,
147
+ blockBodiesSynchedTo : undefined ,
148
148
provenLogsSynchedTo : 3n ,
149
149
} satisfies ArchiverL1SynchPoint ) ;
150
150
} ) ;
0 commit comments