remove unrelated code

This commit is contained in:
Franklin 2018-11-28 22:42:07 +08:00
parent 21dd59bd04
commit 3dba6a6d27
2 changed files with 2 additions and 6 deletions

View File

@ -445,11 +445,7 @@ func (bc *BlockChain) repair(head **types.Block) error {
return nil return nil
} }
// Otherwise rewind one block and recheck state availability there // Otherwise rewind one block and recheck state availability there
block := bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1) (*head) = bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
if block == nil {
return fmt.Errorf("failed to repair block, can not get block at height %d", (*head).NumberU64())
}
(*head) = block
} }
} }

View File

@ -24,7 +24,7 @@ import (
"github.com/ethereum/go-ethereum/p2p/netutil" "github.com/ethereum/go-ethereum/p2p/netutil"
) )
// ServeListener accepts connections on l, serving IPC-RPC on them. // ServeListener accepts connections on l, serving JSON-RPC on them.
func (srv *Server) ServeListener(l net.Listener) error { func (srv *Server) ServeListener(l net.Listener) error {
for { for {
conn, err := l.Accept() conn, err := l.Accept()