mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
core/types: reorder methods
This commit is contained in:
parent
afcd548f5f
commit
95ad65ff9c
1 changed files with 9 additions and 9 deletions
|
|
@ -221,11 +221,6 @@ func newModernSigner(chainID *big.Int, fork forks.Fork) Signer {
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *modernSigner) supportsType(txtype byte) bool {
|
|
||||||
_, ok := s.txtypes[txtype]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *modernSigner) ChainID() *big.Int {
|
func (s *modernSigner) ChainID() *big.Int {
|
||||||
return s.chainID
|
return s.chainID
|
||||||
}
|
}
|
||||||
|
|
@ -235,6 +230,15 @@ func (s *modernSigner) Equal(s2 Signer) bool {
|
||||||
return ok && s.chainID.Cmp(other.chainID) == 0 && maps.Equal(s.txtypes, other.txtypes) && s.legacy.Equal(other.legacy)
|
return ok && s.chainID.Cmp(other.chainID) == 0 && maps.Equal(s.txtypes, other.txtypes) && s.legacy.Equal(other.legacy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *modernSigner) Hash(tx *Transaction) common.Hash {
|
||||||
|
return tx.inner.sigHash(s.chainID)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *modernSigner) supportsType(txtype byte) bool {
|
||||||
|
_, ok := s.txtypes[txtype]
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
func (s *modernSigner) Sender(tx *Transaction) (common.Address, error) {
|
func (s *modernSigner) Sender(tx *Transaction) (common.Address, error) {
|
||||||
tt := tx.Type()
|
tt := tx.Type()
|
||||||
if !s.supportsType(tt) {
|
if !s.supportsType(tt) {
|
||||||
|
|
@ -271,10 +275,6 @@ func (s *modernSigner) SignatureValues(tx *Transaction, sig []byte) (R, S, V *bi
|
||||||
return R, S, V, nil
|
return R, S, V, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *modernSigner) Hash(tx *Transaction) common.Hash {
|
|
||||||
return tx.inner.sigHash(s.chainID)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewPragueSigner returns a signer that accepts
|
// NewPragueSigner returns a signer that accepts
|
||||||
// - EIP-7702 set code transactions
|
// - EIP-7702 set code transactions
|
||||||
// - EIP-4844 blob transactions
|
// - EIP-4844 blob transactions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue