Skip to content

Commit

Permalink
Merge pull request ethereum#127 from etclabscore/feat/1706-1080-parit…
Browse files Browse the repository at this point in the history
…y-goethereum-impls

Feat/1706 1080 parity goethereum impls
  • Loading branch information
meowsbits authored Jan 29, 2020
2 parents c51dc1e + a0897be commit 8b6e6b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
3 changes: 3 additions & 0 deletions params/types/goethereum/goethereum.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ type ChainConfig struct {
// NOTE: These are not included in this type upstream.
TrustedCheckpoint *ctypes.TrustedCheckpoint `json:"trustedCheckpoint"`
TrustedCheckpointOracle *ctypes.CheckpointOracleConfig `json:"trustedCheckpointOracle"`

EIP1706Transition *big.Int `json:"-"`
ECIP1080Transition *big.Int `json:"-"`
}

// String implements the fmt.Stringer interface.
Expand Down
10 changes: 6 additions & 4 deletions params/types/goethereum/goethereum_configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,19 +354,21 @@ func (c *ChainConfig) SetEIP2028Transition(n *uint64) error {
}

func (c *ChainConfig) GetECIP1080Transition() *uint64 {
return nil
return bigNewU64(c.ECIP1080Transition) // FIXME, fudgey
}

func (c *ChainConfig) SetECIP1080Transition(n *uint64) error {
return ctypes.ErrUnsupportedConfigFatal
c.ECIP1080Transition = setBig(c.ECIP1080Transition, n)
return nil
}

func (c *ChainConfig) GetEIP1706Transition() *uint64 {
return nil
return bigNewU64(c.EIP1706Transition)
}

func (c *ChainConfig) SetEIP1706Transition(n *uint64) error {
return ctypes.ErrUnsupportedConfigFatal
c.EIP1706Transition = setBig(c.EIP1706Transition, n)
return nil
}

func (c *ChainConfig) IsForked(fn func() *uint64, n *big.Int) bool {
Expand Down
2 changes: 2 additions & 0 deletions params/types/parity/parity.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ type ParityChainSpec struct {
EIP1344Transition *ParityU64 `json:"eip1344Transition,omitempty"`
EIP1884Transition *ParityU64 `json:"eip1884Transition,omitempty"`
EIP2028Transition *ParityU64 `json:"eip2028Transition,omitempty"`
EIP1706Transition *ParityU64 `json:"-"` // FIXME, when and if i'm implemented in Parity
ECIP1080Transition *ParityU64 `json:"-"` // FIXME, when and if i'm implemented in Parity

ForkBlock *ParityU64 `json:"forkBlock,omitempty"`
ForkCanonHash *common.Hash `json:"forkCanonHash,omitempty"`
Expand Down
10 changes: 6 additions & 4 deletions params/types/parity/parity_configurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,19 +449,21 @@ func (spec *ParityChainSpec) SetEIP1108Transition(n *uint64) error {
}

func (c *ParityChainSpec) GetECIP1080Transition() *uint64 {
return nil // FIXME when+if upstream implements
return c.Params.ECIP1080Transition.Uint64P()
}

func (c *ParityChainSpec) SetECIP1080Transition(n *uint64) error {
return ctypes.ErrUnsupportedConfigFatal
c.Params.ECIP1080Transition = new(ParityU64).SetUint64(n)
return nil
}

func (c *ParityChainSpec) GetEIP1706Transition() *uint64 {
return nil // FIXME when+if upstream implements
return c.Params.EIP1706Transition.Uint64P() // FIXME when+if upstream implements
}

func (c *ParityChainSpec) SetEIP1706Transition(n *uint64) error {
return ctypes.ErrUnsupportedConfigFatal
c.Params.EIP1706Transition = new(ParityU64).SetUint64(n)
return nil
}

func (spec *ParityChainSpec) IsForked(fn func() *uint64, n *big.Int) bool {
Expand Down

0 comments on commit 8b6e6b3

Please sign in to comment.