mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
core: fix BlockSigner tx cause debug API fail after EIP-1559
This commit is contained in:
parent
783d46f29e
commit
4f8d11e11d
2 changed files with 6 additions and 3 deletions
|
|
@ -289,7 +289,7 @@ func (st *StateTransition) preCheck() error {
|
|||
}
|
||||
// This will panic if baseFee is nil, but basefee presence is verified
|
||||
// as part of header validation.
|
||||
if (msg.To() == nil || *msg.To() != common.RandomizeSMCBinary) && st.gasFeeCap.Cmp(st.evm.Context.BaseFee) < 0 {
|
||||
if !types.IsSpecialTx(msg.To()) && st.gasFeeCap.Cmp(st.evm.Context.BaseFee) < 0 {
|
||||
return fmt.Errorf("%w: address %v, maxFeePerGas: %s baseFee: %s", ErrFeeCapTooLow,
|
||||
msg.From().Hex(), st.gasFeeCap, st.evm.Context.BaseFee)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -482,11 +482,14 @@ func (tx *Transaction) TxCost(number *big.Int) *big.Int {
|
|||
return total
|
||||
}
|
||||
|
||||
func (tx *Transaction) IsSpecialTransaction() bool {
|
||||
to := tx.To()
|
||||
func IsSpecialTx(to *common.Address) bool {
|
||||
return to != nil && (*to == common.BlockSignersBinary || *to == common.RandomizeSMCBinary)
|
||||
}
|
||||
|
||||
func (tx *Transaction) IsSpecialTransaction() bool {
|
||||
return IsSpecialTx(tx.To())
|
||||
}
|
||||
|
||||
func (tx *Transaction) IsTradingTransaction() bool {
|
||||
to := tx.To()
|
||||
return to != nil && *to == common.XDCXAddrBinary
|
||||
|
|
|
|||
Loading…
Reference in a new issue