Skip to content

Commit 21dd59b

Browse files
committed
.
1 parent 3d997b6 commit 21dd59b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

core/blockchain.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,11 @@ func (bc *BlockChain) repair(head **types.Block) error {
445445
return nil
446446
}
447447
// Otherwise rewind one block and recheck state availability there
448-
(*head) = bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
448+
block := bc.GetBlock((*head).ParentHash(), (*head).NumberU64()-1)
449+
if block == nil {
450+
return fmt.Errorf("failed to repair block, can not get block at height %d", (*head).NumberU64())
451+
}
452+
(*head) = block
449453
}
450454
}
451455

node/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func (n *Node) stopIPC() {
322322
n.ipcListener.Close()
323323
n.ipcListener = nil
324324

325-
n.log.Info("IPC endpoint closed", "endpoint", n.ipcEndpoint)
325+
n.log.Info("IPC endpoint closed", "url", n.ipcEndpoint)
326326
}
327327
if n.ipcHandler != nil {
328328
n.ipcHandler.Stop()

rpc/ipc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ import (
2424
"github.com/ethereum/go-ethereum/p2p/netutil"
2525
)
2626

27-
// ServeListener accepts connections on l, serving JSON-RPC on them.
27+
// ServeListener accepts connections on l, serving IPC-RPC on them.
2828
func (srv *Server) ServeListener(l net.Listener) error {
2929
for {
3030
conn, err := l.Accept()
3131
if netutil.IsTemporaryError(err) {
32-
log.Warn("RPC accept error", "err", err)
32+
log.Warn("IPC accept error", "err", err)
3333
continue
3434
} else if err != nil {
3535
return err
3636
}
37-
log.Trace("Accepted connection", "addr", conn.RemoteAddr())
37+
log.Trace("IPC accepted connection")
3838
go srv.ServeCodec(NewJSONCodec(conn), OptionMethodInvocation|OptionSubscriptions)
3939
}
4040
}

0 commit comments

Comments
 (0)