diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index 38597e15267a..f25e0cf3c9c5 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -327,9 +327,9 @@ func (c *Clique) verifyCascadingFields(chain consensus.ChainHeaderReader, header if parent == nil || parent.Number.Uint64() != number-1 || parent.Hash() != header.ParentHash { return consensus.ErrUnknownAncestor } - if parent.Time+c.config.Period > header.Time { + /*if parent.Time+c.config.Period > header.Time { return errInvalidTimestamp - } + }*/ // Verify that the gasUsed is <= gasLimit if header.GasUsed > header.GasLimit { return fmt.Errorf("invalid gasUsed: have %d, gasLimit %d", header.GasUsed, header.GasLimit) @@ -553,10 +553,10 @@ func (c *Clique) Prepare(chain consensus.ChainHeaderReader, header *types.Header if parent == nil { return consensus.ErrUnknownAncestor } - header.Time = parent.Time + c.config.Period - if header.Time < uint64(time.Now().Unix()) { - header.Time = uint64(time.Now().Unix()) - } + //header.Time = parent.Time + c.config.Period + //if header.Time < uint64(time.Now().Unix()) { + header.Time = uint64(time.Now().Unix()) + //} return nil } diff --git a/eth/backend.go b/eth/backend.go index ae4e6e85d7fd..be64c75541bf 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -524,21 +524,21 @@ func (s *Ethereum) Protocols() []p2p.Protocol { // Start implements node.Lifecycle, starting all internal goroutines needed by the // Ethereum protocol implementation. func (s *Ethereum) Start() error { - eth.StartENRUpdater(s.blockchain, s.p2pServer.LocalNode()) + //eth.StartENRUpdater(s.blockchain, s.p2pServer.LocalNode()) // Start the bloom bits servicing goroutines s.startBloomHandlers(params.BloomBitsBlocks) // Figure out a max peers count based on the server limits - maxPeers := s.p2pServer.MaxPeers - if s.config.LightServ > 0 { - if s.config.LightPeers >= s.p2pServer.MaxPeers { - return fmt.Errorf("invalid peer config: light peer count (%d) >= total peer count (%d)", s.config.LightPeers, s.p2pServer.MaxPeers) - } - maxPeers -= s.config.LightPeers - } + //maxPeers := s.p2pServer.MaxPeers + //if s.config.LightServ > 0 { + // if s.config.LightPeers >= s.p2pServer.MaxPeers { + // return fmt.Errorf("invalid peer config: light peer count (%d) >= total peer count (%d)", s.config.LightPeers, s.p2pServer.MaxPeers) + // } + // maxPeers -= s.config.LightPeers + //} // Start the networking layer and the light server if requested - s.handler.Start(maxPeers) + //s.handler.Start(maxPeers) return nil } @@ -548,7 +548,7 @@ func (s *Ethereum) Stop() error { // Stop all the peer-related stuff first. s.ethDialCandidates.Close() s.snapDialCandidates.Close() - s.handler.Stop() + //s.handler.Stop() // Then stop everything else. s.bloomIndexer.Close() diff --git a/miner/worker.go b/miner/worker.go index 77e868c2bf4f..bd4c88f418f5 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -393,10 +393,10 @@ func (w *worker) newWorkLoop(recommit time.Duration) { timestamp = time.Now().Unix() commit(false, commitInterruptNewHead) - case head := <-w.chainHeadCh: + /*case head := <-w.chainHeadCh: clearPending(head.Block.NumberU64()) timestamp = time.Now().Unix() - commit(false, commitInterruptNewHead) + commit(false, commitInterruptNewHead)*/ case <-timer.C: // If mining is running resubmit a new work cycle periodically to pull in diff --git a/node/node.go b/node/node.go index ceab1c90902b..aa271e123b52 100644 --- a/node/node.go +++ b/node/node.go @@ -261,15 +261,15 @@ func (n *Node) doClose(errs []error) error { // openEndpoints starts all network and RPC endpoints. func (n *Node) openEndpoints() error { // start networking endpoints - n.log.Info("Starting peer-to-peer node", "instance", n.server.Name) + /*n.log.Info("Starting peer-to-peer node", "instance", n.server.Name) if err := n.server.Start(); err != nil { return convertFileLockError(err) - } + }*/ // start RPC endpoints err := n.startRPC() if err != nil { n.stopRPC() - n.server.Stop() + //n.server.Stop() } return err } @@ -298,7 +298,7 @@ func (n *Node) stopServices(running []Lifecycle) error { } // Stop p2p networking. - n.server.Stop() + //n.server.Stop() if len(failure.Services) > 0 { return failure