@@ -134,7 +134,9 @@ describe("L1BlockContainer", async () => {
134
134
const whitelist = await Whitelist . deploy ( deployer . address ) ;
135
135
await container . updateWhitelist ( whitelist . address ) ;
136
136
137
- await expect ( container . importBlockHeader ( constants . HashZero , [ ] , [ ] ) ) . to . revertedWith ( "Not whitelist sender" ) ;
137
+ await expect ( container . importBlockHeader ( constants . HashZero , [ ] , false ) ) . to . revertedWith (
138
+ "Not whitelisted sender"
139
+ ) ;
138
140
} ) ;
139
141
140
142
it ( "should revert, when block hash mismatch" , async ( ) => {
@@ -146,7 +148,7 @@ describe("L1BlockContainer", async () => {
146
148
test . stateRoot
147
149
) ;
148
150
const headerRLP = encodeHeader ( test ) ;
149
- await expect ( container . importBlockHeader ( test . parentHash , headerRLP , "0x" ) ) . to . revertedWith (
151
+ await expect ( container . importBlockHeader ( test . parentHash , headerRLP , false ) ) . to . revertedWith (
150
152
"Block hash mismatch"
151
153
) ;
152
154
} ) ;
@@ -160,7 +162,7 @@ describe("L1BlockContainer", async () => {
160
162
test . stateRoot
161
163
) ;
162
164
const headerRLP = encodeHeader ( test ) ;
163
- await expect ( container . importBlockHeader ( test . hash , concat ( [ headerRLP , "0x00" ] ) , "0x" ) ) . to . revertedWith (
165
+ await expect ( container . importBlockHeader ( test . hash , concat ( [ headerRLP , "0x00" ] ) , false ) ) . to . revertedWith (
164
166
"Header RLP length mismatch"
165
167
) ;
166
168
} ) ;
@@ -174,7 +176,7 @@ describe("L1BlockContainer", async () => {
174
176
test . stateRoot
175
177
) ;
176
178
const headerRLP = encodeHeader ( test ) ;
177
- await expect ( container . importBlockHeader ( test . hash , headerRLP , "0x" ) ) . to . revertedWith ( "Parent not imported" ) ;
179
+ await expect ( container . importBlockHeader ( test . hash , headerRLP , false ) ) . to . revertedWith ( "Parent not imported" ) ;
178
180
} ) ;
179
181
180
182
it ( "should revert, when block height mismatch" , async ( ) => {
@@ -186,7 +188,7 @@ describe("L1BlockContainer", async () => {
186
188
test . stateRoot
187
189
) ;
188
190
const headerRLP = encodeHeader ( test ) ;
189
- await expect ( container . importBlockHeader ( test . hash , headerRLP , "0x" ) ) . to . revertedWith ( "Block height mismatch" ) ;
191
+ await expect ( container . importBlockHeader ( test . hash , headerRLP , false ) ) . to . revertedWith ( "Block height mismatch" ) ;
190
192
} ) ;
191
193
192
194
it ( "should revert, when parent block has larger timestamp" , async ( ) => {
@@ -198,7 +200,7 @@ describe("L1BlockContainer", async () => {
198
200
test . stateRoot
199
201
) ;
200
202
const headerRLP = encodeHeader ( test ) ;
201
- await expect ( container . importBlockHeader ( test . hash , headerRLP , "0x" ) ) . to . revertedWith (
203
+ await expect ( container . importBlockHeader ( test . hash , headerRLP , false ) ) . to . revertedWith (
202
204
"Parent block has larger timestamp"
203
205
) ;
204
206
} ) ;
@@ -213,7 +215,7 @@ describe("L1BlockContainer", async () => {
213
215
) ;
214
216
expect ( await container . latestBlockHash ( ) ) . to . eq ( test . parentHash ) ;
215
217
const headerRLP = encodeHeader ( test ) ;
216
- await expect ( container . importBlockHeader ( test . hash , headerRLP , "0x" ) )
218
+ await expect ( container . importBlockHeader ( test . hash , headerRLP , false ) )
217
219
. to . emit ( container , "ImportBlock" )
218
220
. withArgs ( test . hash , test . blockHeight , test . blockTimestamp , test . baseFee , test . stateRoot ) ;
219
221
expect ( await container . getStateRoot ( test . hash ) ) . to . eq ( test . stateRoot ) ;
0 commit comments