From 04f532a9fbf1c98c7d813bc266d95929149d64ef Mon Sep 17 00:00:00 2001 From: Tuna Date: Tue, 12 Feb 2019 16:35:35 +0700 Subject: [PATCH] remove testnet hard-fork --- common/constants.go | 1 - consensus/posv/posv.go | 13 +++++-------- eth/backend.go | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/common/constants.go b/common/constants.go index b9655826fa..6b483d9b2c 100644 --- a/common/constants.go +++ b/common/constants.go @@ -21,7 +21,6 @@ const ( ) var TIP2019Block = big.NewInt(1050000) -var TestnetHF1 = uint64(909000) var IsTestnet = false var StoreRewardFolder string var RollbackHash Hash diff --git a/consensus/posv/posv.go b/consensus/posv/posv.go index fc24a8e425..7817cbc7db 100644 --- a/consensus/posv/posv.go +++ b/consensus/posv/posv.go @@ -307,7 +307,7 @@ func (c *Posv) verifyHeaderWithCache(chain consensus.ChainReader, header *types. // looking those up from the database. This is useful for concurrently verifying // a batch of new headers. func (c *Posv) verifyHeader(chain consensus.ChainReader, header *types.Header, parents []*types.Header, fullVerify bool) error { - if common.IsTestnet && header.Number.Uint64() >= common.TestnetHF1 { + if common.IsTestnet { fullVerify = false } if header.Number == nil { @@ -489,13 +489,10 @@ func (c *Posv) YourTurn(chain consensus.ChainReader, parent *types.Header, signe if common.IsTestnet { // Only three mns hard code for tomo testnet. - masternodes = masternodes[:3] - if parent.Number.Uint64() >= common.TestnetHF1 { - masternodes = []common.Address{ - common.HexToAddress("0xfFC679Dcdf444D2eEb0491A998E7902B411CcF20"), - common.HexToAddress("0xd76fd76F7101811726DCE9E43C2617706a4c45c8"), - common.HexToAddress("0x8A97753311aeAFACfd76a68Cf2e2a9808d3e65E8"), - } + masternodes = []common.Address{ + common.HexToAddress("0xfFC679Dcdf444D2eEb0491A998E7902B411CcF20"), + common.HexToAddress("0xd76fd76F7101811726DCE9E43C2617706a4c45c8"), + common.HexToAddress("0x8A97753311aeAFACfd76a68Cf2e2a9808d3e65E8"), } } diff --git a/eth/backend.go b/eth/backend.go index bf3b7eea5f..cb6bcfeae4 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -580,7 +580,7 @@ func (s *Ethereum) ValidateMasternode() (bool, error) { } else { return false, fmt.Errorf("Only verify masternode permission in PoSV protocol") } - if common.IsTestnet && s.blockchain.CurrentHeader().Number.Uint64() >= common.TestnetHF1 { + if common.IsTestnet { masternodes := []common.Address{ common.HexToAddress("0xfFC679Dcdf444D2eEb0491A998E7902B411CcF20"), common.HexToAddress("0xd76fd76F7101811726DCE9E43C2617706a4c45c8"),