Skip to content

Commit 022f8f0

Browse files
add test confirming transition from non-sharding to sharding works even if first sharding block has blobs (#38)
1 parent 0a53f99 commit 022f8f0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

core/blockchain_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3906,13 +3906,19 @@ func TestDataBlobTxs(t *testing.T) {
39063906
}
39073907
)
39083908

3909-
gspec.Config.BerlinBlock = common.Big0
3910-
gspec.Config.LondonBlock = common.Big0
3911-
gspec.Config.ShardingForkBlock = common.Big0
3909+
// We test the transition from non-sharding to sharding
3910+
// Genesis (block 0): AllEthhashProtocolChanges
3911+
// Block 1 : ""
3912+
// Block 2 : Sharding
3913+
gspec.Config.ShardingForkBlock = common.Big2
39123914
genesis := gspec.MustCommit(db)
39133915
signer := types.LatestSigner(gspec.Config)
39143916

3915-
blocks, _ := GenerateChain(gspec.Config, genesis, engine, db, 1, func(i int, b *BlockGen) {
3917+
blocks, _ := GenerateChain(gspec.Config, genesis, engine, db, 2, func(i int, b *BlockGen) {
3918+
if i == 0 {
3919+
// i==0 is a non-sharding block
3920+
return
3921+
}
39163922
b.SetCoinbase(common.Address{1})
39173923
msg := types.BlobTxMessage{
39183924
Nonce: 0,

0 commit comments

Comments
 (0)