Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
21dd59bd
Commit
21dd59bd
authored
Nov 20, 2018
by
Franklin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3d997b6d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
blockchain.go
core/blockchain.go
+5
-1
node.go
node/node.go
+1
-1
ipc.go
rpc/ipc.go
+3
-3
No files found.
core/blockchain.go
View file @
21dd59bd
...
...
@@ -445,7 +445,11 @@ func (bc *BlockChain) repair(head **types.Block) error {
return
nil
}
// Otherwise rewind one block and recheck state availability there
(
*
head
)
=
bc
.
GetBlock
((
*
head
)
.
ParentHash
(),
(
*
head
)
.
NumberU64
()
-
1
)
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
}
}
...
...
node/node.go
View file @
21dd59bd
...
...
@@ -322,7 +322,7 @@ func (n *Node) stopIPC() {
n
.
ipcListener
.
Close
()
n
.
ipcListener
=
nil
n
.
log
.
Info
(
"IPC endpoint closed"
,
"
endpoint
"
,
n
.
ipcEndpoint
)
n
.
log
.
Info
(
"IPC endpoint closed"
,
"
url
"
,
n
.
ipcEndpoint
)
}
if
n
.
ipcHandler
!=
nil
{
n
.
ipcHandler
.
Stop
()
...
...
rpc/ipc.go
View file @
21dd59bd
...
...
@@ -24,17 +24,17 @@ import (
"github.com/ethereum/go-ethereum/p2p/netutil"
)
// ServeListener accepts connections on l, serving
JSON
-RPC on them.
// ServeListener accepts connections on l, serving
IPC
-RPC on them.
func
(
srv
*
Server
)
ServeListener
(
l
net
.
Listener
)
error
{
for
{
conn
,
err
:=
l
.
Accept
()
if
netutil
.
IsTemporaryError
(
err
)
{
log
.
Warn
(
"
R
PC accept error"
,
"err"
,
err
)
log
.
Warn
(
"
I
PC accept error"
,
"err"
,
err
)
continue
}
else
if
err
!=
nil
{
return
err
}
log
.
Trace
(
"
Accepted connection"
,
"addr"
,
conn
.
RemoteAddr
()
)
log
.
Trace
(
"
IPC accepted connection"
)
go
srv
.
ServeCodec
(
NewJSONCodec
(
conn
),
OptionMethodInvocation
|
OptionSubscriptions
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment