aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranklin <mr_franklin@126.com>2018-11-28 22:42:07 +0800
committerFranklin <mr_franklin@126.com>2018-11-28 22:42:07 +0800
commit3dba6a6d27cc98814a23555d84cf6f016fe4635d (patch)
treed6909165ca1ed73cce7b9a5d828aab6bdd08b1ca
parent21dd59bd047d1f291c1a773b690825a3654ea969 (diff)
downloadgo-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.tar
go-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.tar.gz
go-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.tar.bz2
go-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.tar.lz
go-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.tar.xz
go-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.tar.zst
go-tangerine-3dba6a6d27cc98814a23555d84cf6f016fe4635d.zip
remove unrelated code
-rw-r--r--core/blockchain.go6
-rw-r--r--rpc/ipc.go2
2 files changed, 2 insertions, 6 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index ee1c0702b..d173b2de2 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -445,11 +445,7 @@ func (bc *BlockChain) repair(head **types.Block) error {
return nil
}
// Otherwise rewind one block and recheck state availability there
- block := 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
+ (*head) = bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
}
}
diff --git a/rpc/ipc.go b/rpc/ipc.go
index 1467f7a0c..4cce1cf74 100644
--- a/rpc/ipc.go
+++ b/rpc/ipc.go
@@ -24,7 +24,7 @@ import (
"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 {
for {
conn, err := l.Accept()