mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
core/types: deprecate concrete signer types
This commit is contained in:
parent
95ad65ff9c
commit
2fe36ecb3d
1 changed files with 5 additions and 4 deletions
|
|
@ -313,6 +313,7 @@ func NewEIP2930Signer(chainId *big.Int) Signer {
|
||||||
|
|
||||||
// EIP155Signer implements Signer using the EIP-155 rules. This accepts transactions which
|
// EIP155Signer implements Signer using the EIP-155 rules. This accepts transactions which
|
||||||
// are replay-protected as well as unprotected homestead transactions.
|
// are replay-protected as well as unprotected homestead transactions.
|
||||||
|
// Deprecated: always use the Signer interface type
|
||||||
type EIP155Signer struct {
|
type EIP155Signer struct {
|
||||||
chainId, chainIdMul *big.Int
|
chainId, chainIdMul *big.Int
|
||||||
}
|
}
|
||||||
|
|
@ -374,8 +375,8 @@ func (s EIP155Signer) Hash(tx *Transaction) common.Hash {
|
||||||
return tx.inner.sigHash(s.chainId)
|
return tx.inner.sigHash(s.chainId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// HomesteadSigner implements Signer interface using the
|
// HomesteadSigner implements Signer using the homestead rules.
|
||||||
// homestead rules.
|
// Deprecated: always use the Signer interface type
|
||||||
type HomesteadSigner struct{ FrontierSigner }
|
type HomesteadSigner struct{ FrontierSigner }
|
||||||
|
|
||||||
func (hs HomesteadSigner) ChainID() *big.Int {
|
func (hs HomesteadSigner) ChainID() *big.Int {
|
||||||
|
|
@ -401,8 +402,8 @@ func (hs HomesteadSigner) Sender(tx *Transaction) (common.Address, error) {
|
||||||
return recoverPlain(hs.Hash(tx), r, s, v, true)
|
return recoverPlain(hs.Hash(tx), r, s, v, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FrontierSigner implements Signer interface using the
|
// FrontierSigner implements Signer using the frontier rules.
|
||||||
// frontier rules.
|
// Deprecated: always use the Signer interface type
|
||||||
type FrontierSigner struct{}
|
type FrontierSigner struct{}
|
||||||
|
|
||||||
func (fs FrontierSigner) ChainID() *big.Int {
|
func (fs FrontierSigner) ChainID() *big.Int {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue