core/types: update MakeSigner

This commit is contained in:
kane 2019-04-15 22:25:48 -04:00
parent 1528b791ac
commit 72af2f0fa5

View file

@ -39,8 +39,7 @@ type sigCache struct {
}
// MakeSigner returns a Signer based on the given chain config and block number.
func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) Signer {
var signer Signer
func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) (signer Signer) {
switch {
case config.IsEIP155(blockNumber):
signer = NewEIP155Signer(config.ChainID)
@ -49,7 +48,7 @@ func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) Signer {
default:
signer = FrontierSigner{}
}
return signer
return
}
// SignTx signs the transaction using the given signer and private key