Skip to content

Commit

Permalink
triedb/pathdb: fix nil field for stateSet (#2827)
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 authored Dec 30, 2024
1 parent 9b0130f commit e36ed32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions triedb/pathdb/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func (db *Database) loadDiskLayer(r *rlp.Stream, journalTypeForReader JournalTyp
}

// handle new states in journal v2
var states stateSet
var states = newStates(nil, nil)
if version == journalVersion {
// Resolve flat state sets in aggregated buffer
if err := states.decode(journalBuf); err != nil {
Expand All @@ -343,7 +343,7 @@ func (db *Database) loadDiskLayer(r *rlp.Stream, journalTypeForReader JournalTyp
}

// Calculate the internal state transitions by id difference.
base := newDiskLayer(root, id, db, nil, NewTrieNodeBuffer(db.config.SyncFlush, db.config.WriteBufferSize, &nodes, &states, id-stored))
base := newDiskLayer(root, id, db, nil, NewTrieNodeBuffer(db.config.SyncFlush, db.config.WriteBufferSize, &nodes, states, id-stored))
return base, nil
}

Expand Down

0 comments on commit e36ed32

Please sign in to comment.