Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
fix(tstore): journal size
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Sep 22, 2023
1 parent d5824bc commit 6a92c39
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions eth/core/state/journal/transient_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,12 @@ func (t *transientStorage) Finalize() {

// Clone implements `libtypes.Cloneable`.
func (t *transientStorage) Clone() TransientStorage {
size := t.Size()
clone := &transientStorage{
newBaseJournal[transientState](initCapacity),
newBaseJournal[transientState](t.Capacity()),
}

// copy every individual transient state
for i := 0; i < size; i++ {
for i := 0; i < t.Size(); i++ {
clone.Push(t.PeekAt(i).Copy())
}

Expand Down

0 comments on commit 6a92c39

Please sign in to comment.