all: rename internal 1559 gas fields, add support for graphql (#23010)
* all: rename internal 1559 gas fields, add support for graphql * cmd/evm/testdata, core: use public 1559 gas names on API surfaces
This commit is contained in:
@ -210,8 +210,8 @@ func (s *txSorter) Swap(i, j int) {
|
||||
func (s *txSorter) Less(i, j int) bool {
|
||||
// It's okay to discard the error because a tx would never be
|
||||
// accepted into a block with an invalid effective tip.
|
||||
tip1, _ := s.txs[i].EffectiveTip(s.baseFee)
|
||||
tip2, _ := s.txs[j].EffectiveTip(s.baseFee)
|
||||
tip1, _ := s.txs[i].EffectiveGasTip(s.baseFee)
|
||||
tip2, _ := s.txs[j].EffectiveGasTip(s.baseFee)
|
||||
return tip1.Cmp(tip2) < 0
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ func (gpo *Oracle) getBlockValues(ctx context.Context, signer types.Signer, bloc
|
||||
|
||||
var prices []*big.Int
|
||||
for _, tx := range sorter.txs {
|
||||
tip, _ := tx.EffectiveTip(block.BaseFee())
|
||||
tip, _ := tx.EffectiveGasTip(block.BaseFee())
|
||||
if ignoreUnder != nil && tip.Cmp(ignoreUnder) == -1 {
|
||||
continue
|
||||
}
|
||||
|
@ -80,13 +80,13 @@ func newTestBackend(t *testing.T, londonBlock *big.Int) *testBackend {
|
||||
var tx *types.Transaction
|
||||
if londonBlock != nil && b.Number().Cmp(londonBlock) >= 0 {
|
||||
txdata := &types.DynamicFeeTx{
|
||||
ChainID: gspec.Config.ChainID,
|
||||
Nonce: b.TxNonce(addr),
|
||||
To: &common.Address{},
|
||||
Gas: 30000,
|
||||
FeeCap: big.NewInt(100 * params.GWei),
|
||||
Tip: big.NewInt(int64(i+1) * params.GWei),
|
||||
Data: []byte{},
|
||||
ChainID: gspec.Config.ChainID,
|
||||
Nonce: b.TxNonce(addr),
|
||||
To: &common.Address{},
|
||||
Gas: 30000,
|
||||
GasFeeCap: big.NewInt(100 * params.GWei),
|
||||
GasTipCap: big.NewInt(int64(i+1) * params.GWei),
|
||||
Data: []byte{},
|
||||
}
|
||||
tx = types.NewTx(txdata)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user