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
2c58e6b6
Unverified
Commit
2c58e6b6
authored
3 years ago
by
Darioush Jalali
Committed by
GitHub
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trie: use keyvalue reader for non-mutating methods (#24221)
parent
52448e95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
iterator.go
trie/iterator.go
+5
-5
No files found.
trie/iterator.go
View file @
2c58e6b6
...
...
@@ -115,7 +115,7 @@ type NodeIterator interface {
// Before adding a similar mechanism to any other place in Geth, consider
// making trie.Database an interface and wrapping at that level. It's a huge
// refactor, but it could be worth it if another occurrence arises.
AddResolver
(
ethdb
.
KeyValue
Store
)
AddResolver
(
ethdb
.
KeyValue
Reader
)
}
// nodeIteratorState represents the iteration state at one particular node of the
...
...
@@ -134,7 +134,7 @@ type nodeIterator struct {
path
[]
byte
// Path to the current node
err
error
// Failure set in case of an internal error in the iterator
resolver
ethdb
.
KeyValue
Store
// Optional intermediate resolver above the disk layer
resolver
ethdb
.
KeyValue
Reader
// Optional intermediate resolver above the disk layer
}
// errIteratorEnd is stored in nodeIterator.err when iteration is done.
...
...
@@ -159,7 +159,7 @@ func newNodeIterator(trie *Trie, start []byte) NodeIterator {
return
it
}
func
(
it
*
nodeIterator
)
AddResolver
(
resolver
ethdb
.
KeyValue
Store
)
{
func
(
it
*
nodeIterator
)
AddResolver
(
resolver
ethdb
.
KeyValue
Reader
)
{
it
.
resolver
=
resolver
}
...
...
@@ -549,7 +549,7 @@ func (it *differenceIterator) Path() []byte {
return
it
.
b
.
Path
()
}
func
(
it
*
differenceIterator
)
AddResolver
(
resolver
ethdb
.
KeyValue
Store
)
{
func
(
it
*
differenceIterator
)
AddResolver
(
resolver
ethdb
.
KeyValue
Reader
)
{
panic
(
"not implemented"
)
}
...
...
@@ -660,7 +660,7 @@ func (it *unionIterator) Path() []byte {
return
(
*
it
.
items
)[
0
]
.
Path
()
}
func
(
it
*
unionIterator
)
AddResolver
(
resolver
ethdb
.
KeyValue
Store
)
{
func
(
it
*
unionIterator
)
AddResolver
(
resolver
ethdb
.
KeyValue
Reader
)
{
panic
(
"not implemented"
)
}
...
...
This diff is collapsed.
Click to expand it.
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