@@ -26,9 +26,9 @@ import (
26
26
"github.com/ethereum/go-ethereum/trie"
27
27
)
28
28
29
- // NodeIterator is an iterator to traverse the entire state trie post-order,
29
+ // nodeIterator is an iterator to traverse the entire state trie post-order,
30
30
// including all of the contract code and contract state tries.
31
- type NodeIterator struct {
31
+ type nodeIterator struct {
32
32
state * StateDB // State being iterated
33
33
34
34
stateIt trie.NodeIterator // Primary iterator for the global state trie
@@ -44,17 +44,17 @@ type NodeIterator struct {
44
44
Error error // Failure set in case of an internal error in the iterator
45
45
}
46
46
47
- // NewNodeIterator creates an post-order state node iterator.
48
- func NewNodeIterator (state * StateDB ) * NodeIterator {
49
- return & NodeIterator {
47
+ // newNodeIterator creates an post-order state node iterator.
48
+ func newNodeIterator (state * StateDB ) * nodeIterator {
49
+ return & nodeIterator {
50
50
state : state ,
51
51
}
52
52
}
53
53
54
54
// Next moves the iterator to the next node, returning whether there are any
55
55
// further nodes. In case of an internal error this method returns false and
56
56
// sets the Error field to the encountered failure.
57
- func (it * NodeIterator ) Next () bool {
57
+ func (it * nodeIterator ) Next () bool {
58
58
// If the iterator failed previously, don't do anything
59
59
if it .Error != nil {
60
60
return false
@@ -68,7 +68,7 @@ func (it *NodeIterator) Next() bool {
68
68
}
69
69
70
70
// step moves the iterator to the next entry of the state trie.
71
- func (it * NodeIterator ) step () error {
71
+ func (it * nodeIterator ) step () error {
72
72
// Abort if we reached the end of the iteration
73
73
if it .state == nil {
74
74
return nil
@@ -131,7 +131,7 @@ func (it *NodeIterator) step() error {
131
131
132
132
// retrieve pulls and caches the current state entry the iterator is traversing.
133
133
// The method returns whether there are any more data left for inspection.
134
- func (it * NodeIterator ) retrieve () bool {
134
+ func (it * nodeIterator ) retrieve () bool {
135
135
// Clear out any previously set values
136
136
it .Hash = common.Hash {}
137
137
0 commit comments