mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2025-01-08 19:51:21 +00:00
Refactor transaction signing
This commit is contained in:
parent
f5f5155f1d
commit
3b9a0c035f
@ -45,14 +45,10 @@ func MakeSigner(config *params.ChainConfig, blockNumber *big.Int) Signer {
|
|||||||
// required to validate transactions on mainnet
|
// required to validate transactions on mainnet
|
||||||
chainID := big.NewInt(1)
|
chainID := big.NewInt(1)
|
||||||
|
|
||||||
// Set the chainId to Pulsechain
|
|
||||||
if config.IsPrimordialPulse(blockNumber) {
|
|
||||||
chainID = config.ChainID
|
|
||||||
}
|
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case config.IsPrimordialPulse(blockNumber):
|
case config.IsPrimordialPulse(blockNumber):
|
||||||
signer = NewEIP155Signer(chainID)
|
// Set the chainId to Pulsechain
|
||||||
|
signer = NewEIP155Signer(config.ChainID)
|
||||||
case config.IsLondon(blockNumber):
|
case config.IsLondon(blockNumber):
|
||||||
signer = NewLondonSigner(config.ChainID)
|
signer = NewLondonSigner(config.ChainID)
|
||||||
case config.IsBerlin(blockNumber):
|
case config.IsBerlin(blockNumber):
|
||||||
|
Loading…
Reference in New Issue
Block a user