mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
Update nodes.go
This commit is contained in:
parent
cb97c48cb6
commit
3c474a7bc6
1 changed files with 8 additions and 2 deletions
|
|
@ -218,7 +218,10 @@ func (s *nodeSet) encode(w io.Writer) error {
|
|||
|
||||
// Encode account nodes
|
||||
if len(s.accountNodes) > 0 {
|
||||
entry := journalNodes{Owner: common.Hash{}}
|
||||
entry := journalNodes{
|
||||
Owner: common.Hash{},
|
||||
Nodes: make([]journalNode, 0, len(s.accountNodes)),
|
||||
}
|
||||
for path, node := range s.accountNodes {
|
||||
entry.Nodes = append(entry.Nodes, journalNode{
|
||||
Path: []byte(path),
|
||||
|
|
@ -229,7 +232,10 @@ func (s *nodeSet) encode(w io.Writer) error {
|
|||
}
|
||||
// Encode storage nodes
|
||||
for owner, subset := range s.storageNodes {
|
||||
entry := journalNodes{Owner: owner}
|
||||
entry := journalNodes{
|
||||
Owner: owner,
|
||||
Nodes: make([]journalNode, 0, len(subset)),
|
||||
}
|
||||
for path, node := range subset {
|
||||
entry.Nodes = append(entry.Nodes, journalNode{
|
||||
Path: []byte(path),
|
||||
|
|
|
|||
Loading…
Reference in a new issue