mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
core/types: use fields directly
This commit is contained in:
parent
58fb7bf89a
commit
a650a400a0
1 changed files with 11 additions and 10 deletions
|
|
@ -366,21 +366,22 @@ func (s londonSigner) SignatureValues(tx *Transaction, sig []byte) (R, S, V *big
|
||||||
// Hash returns the hash to be signed by the sender.
|
// Hash returns the hash to be signed by the sender.
|
||||||
// It does not uniquely identify the transaction.
|
// It does not uniquely identify the transaction.
|
||||||
func (s londonSigner) Hash(tx *Transaction) common.Hash {
|
func (s londonSigner) Hash(tx *Transaction) common.Hash {
|
||||||
if tx.Type() != DynamicFeeTxType {
|
inner, ok := tx.inner.(*DynamicFeeTx)
|
||||||
|
if !ok {
|
||||||
return s.eip2930Signer.Hash(tx)
|
return s.eip2930Signer.Hash(tx)
|
||||||
}
|
}
|
||||||
return prefixedRlpHash(
|
return prefixedRlpHash(
|
||||||
tx.Type(),
|
inner.txType(),
|
||||||
[]interface{}{
|
[]interface{}{
|
||||||
s.chainId,
|
s.chainId,
|
||||||
tx.Nonce(),
|
inner.nonce(),
|
||||||
tx.GasTipCap(),
|
inner.gasTipCap(),
|
||||||
tx.GasFeeCap(),
|
inner.gasFeeCap(),
|
||||||
tx.Gas(),
|
inner.gas(),
|
||||||
tx.To(),
|
inner.to(),
|
||||||
tx.Value(),
|
inner.value(),
|
||||||
tx.Data(),
|
inner.data(),
|
||||||
tx.AccessList(),
|
inner.accessList(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue