diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-02 20:44:13 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-13 21:55:30 +0800 |
commit | 4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188 (patch) | |
tree | 5c55a3088c944ddf517aa4d7c85c5dc7f02d00e4 /accounts/abi/bind/auth.go | |
parent | 5cd86443ee071b5e3abe4995c777ce467c29f2c5 (diff) | |
download | dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.gz dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.bz2 dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.lz dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.xz dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.tar.zst dexon-4dca5d4db7fc2c1fac5a2e24dcc99b15573f0188.zip |
core/types, params: EIP#155
Diffstat (limited to 'accounts/abi/bind/auth.go')
-rw-r--r-- | accounts/abi/bind/auth.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accounts/abi/bind/auth.go b/accounts/abi/bind/auth.go index cd6adc746..a20852fca 100644 --- a/accounts/abi/bind/auth.go +++ b/accounts/abi/bind/auth.go @@ -48,15 +48,15 @@ func NewKeyedTransactor(key *ecdsa.PrivateKey) *TransactOpts { keyAddr := crypto.PubkeyToAddress(key.PublicKey) return &TransactOpts{ From: keyAddr, - Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) { + Signer: func(signer types.Signer, address common.Address, tx *types.Transaction) (*types.Transaction, error) { if address != keyAddr { return nil, errors.New("not authorized to sign this account") } - signature, err := crypto.SignEthereum(tx.SigHash().Bytes(), key) + signature, err := crypto.SignEthereum(signer.Hash(tx).Bytes(), key) if err != nil { return nil, err } - return tx.WithSignature(signature) + return tx.WithSignature(signer, signature) }, } } |