Skip to content

Commit da6185c

Browse files
authored
Merge pull request scroll-tech#46 from morph-l2/merge_v5.1.10
Merge v5.1.10
2 parents 4a5aa16 + 884c0ff commit da6185c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

core/tx_pool.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,14 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
667667
if pool.currentState.GetNonce(from) > tx.Nonce() {
668668
return ErrNonceTooLow
669669
}
670+
// Get L1 data fee in current state
671+
l1DataFee, err := fees.CalculateL1DataFee(tx, pool.currentState)
672+
if err != nil {
673+
return fmt.Errorf("failed to calculate L1 data fee, err: %w", err)
674+
}
670675
// Transactor should have enough funds to cover the costs
671676
// cost == V + GP * GL
672-
if pool.currentState.GetBalance(from).Cmp(tx.Cost()) < 0 {
677+
if pool.currentState.GetBalance(from).Cmp(new(big.Int).Add(tx.Cost(), l1DataFee)) < 0 {
673678
return ErrInsufficientFunds
674679
}
675680
// Ensure the transaction has more gas than the basic tx fee.

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 5 // Major version component of the current release
2626
VersionMinor = 1 // Minor version component of the current release
27-
VersionPatch = 9 // Patch version component of the current release
27+
VersionPatch = 10 // Patch version component of the current release
2828
VersionMeta = "mainnet" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)