add: commits back from reverted 'consistent' PR

This commit is contained in:
Anshal Shukla 2024-03-28 15:19:36 +05:30
parent 0980a5b3e5
commit a9969cb644
No known key found for this signature in database
GPG key ID: 84BE5474523D8CBC
2 changed files with 2 additions and 1 deletions

View file

@ -93,7 +93,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
return core.ErrTipAboveFeeCap return core.ErrTipAboveFeeCap
} }
// Make sure the transaction is signed properly // Make sure the transaction is signed properly
if _, err := types.Sender(signer, tx); err != nil || !opts.AllowUnprotectedTxs { if _, err := types.Sender(signer, tx); err != nil && !opts.AllowUnprotectedTxs {
return ErrInvalidSender return ErrInvalidSender
} }
// Ensure the transaction has more gas than the bare minimum needed to cover // Ensure the transaction has more gas than the bare minimum needed to cover

View file

@ -174,6 +174,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
eth.APIBackend = &EthAPIBackend{stack.Config().ExtRPCEnabled(), stack.Config().AllowUnprotectedTxs, eth, nil} eth.APIBackend = &EthAPIBackend{stack.Config().ExtRPCEnabled(), stack.Config().AllowUnprotectedTxs, eth, nil}
if eth.APIBackend.allowUnprotectedTxs { if eth.APIBackend.allowUnprotectedTxs {
log.Info("------Unprotected transactions allowed-------")
config.TxPool.AllowUnprotectedTxs = true config.TxPool.AllowUnprotectedTxs = true
} }