@@ -645,26 +645,43 @@ func TestShanghaiValidateTx(t *testing.T) {
645
645
expected txpoolcfg.DiscardReason
646
646
dataLen int
647
647
isShanghai bool
648
+ creation bool
648
649
}{
649
650
"no shanghai" : {
650
651
expected : txpoolcfg .Success ,
651
652
dataLen : 32 ,
652
653
isShanghai : false ,
654
+ creation : true ,
653
655
},
654
656
"shanghai within bounds" : {
655
657
expected : txpoolcfg .Success ,
656
658
dataLen : 32 ,
657
659
isShanghai : true ,
660
+ creation : true ,
658
661
},
659
- "shanghai exactly on bound" : {
662
+ "shanghai exactly on bound - create tx " : {
660
663
expected : txpoolcfg .Success ,
661
664
dataLen : fixedgas .MaxInitCodeSize ,
662
665
isShanghai : true ,
666
+ creation : true ,
663
667
},
664
- "shanghai one over bound" : {
668
+ "shanghai one over bound - create tx " : {
665
669
expected : txpoolcfg .InitCodeTooLarge ,
666
670
dataLen : fixedgas .MaxInitCodeSize + 1 ,
667
671
isShanghai : true ,
672
+ creation : true ,
673
+ },
674
+ "shanghai exactly on bound - calldata tx" : {
675
+ expected : txpoolcfg .Success ,
676
+ dataLen : fixedgas .MaxInitCodeSize ,
677
+ isShanghai : true ,
678
+ creation : false ,
679
+ },
680
+ "shanghai one over bound - calldata tx" : {
681
+ expected : txpoolcfg .Success ,
682
+ dataLen : fixedgas .MaxInitCodeSize + 1 ,
683
+ isShanghai : true ,
684
+ creation : false ,
668
685
},
669
686
}
670
687
@@ -700,7 +717,7 @@ func TestShanghaiValidateTx(t *testing.T) {
700
717
FeeCap : * uint256 .NewInt (21000 ),
701
718
Gas : 500000 ,
702
719
SenderID : 0 ,
703
- Creation : true ,
720
+ Creation : test . creation ,
704
721
}
705
722
706
723
txns := types.TxSlots {
0 commit comments