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
bddd103a
Unverified
Commit
bddd103a
authored
Nov 24, 2020
by
Felföldi Zsolt
Committed by
GitHub
Nov 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
les: fix GetProofsV2 bug (#21896)
parent
6b584096
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
server_handler.go
les/server_handler.go
+2
-4
No files found.
les/server_handler.go
View file @
bddd103a
...
@@ -610,6 +610,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
...
@@ -610,6 +610,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
var
(
var
(
lastBHash
common
.
Hash
lastBHash
common
.
Hash
root
common
.
Hash
root
common
.
Hash
header
*
types
.
Header
)
)
reqCnt
:=
len
(
req
.
Reqs
)
reqCnt
:=
len
(
req
.
Reqs
)
if
accept
(
req
.
ReqID
,
uint64
(
reqCnt
),
MaxProofsFetch
)
{
if
accept
(
req
.
ReqID
,
uint64
(
reqCnt
),
MaxProofsFetch
)
{
...
@@ -624,10 +625,6 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
...
@@ -624,10 +625,6 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
return
return
}
}
// Look up the root hash belonging to the request
// Look up the root hash belonging to the request
var
(
header
*
types
.
Header
trie
state
.
Trie
)
if
request
.
BHash
!=
lastBHash
{
if
request
.
BHash
!=
lastBHash
{
root
,
lastBHash
=
common
.
Hash
{},
request
.
BHash
root
,
lastBHash
=
common
.
Hash
{},
request
.
BHash
...
@@ -654,6 +651,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
...
@@ -654,6 +651,7 @@ func (h *serverHandler) handleMsg(p *clientPeer, wg *sync.WaitGroup) error {
// Open the account or storage trie for the request
// Open the account or storage trie for the request
statedb
:=
h
.
blockchain
.
StateCache
()
statedb
:=
h
.
blockchain
.
StateCache
()
var
trie
state
.
Trie
switch
len
(
request
.
AccKey
)
{
switch
len
(
request
.
AccKey
)
{
case
0
:
case
0
:
// No account key specified, open an account trie
// No account key specified, open an account trie
...
...
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