Skip to content

Commit

Permalink
fix panic NewStackTrie (0xPolygonHermez#3146)
Browse files Browse the repository at this point in the history
  • Loading branch information
ARR552 authored Jan 25, 2024
1 parent 4ddba20 commit 1825164
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion state/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ func (s *State) StoreL2Block(ctx context.Context, batchNumber uint64, l2Block *P
}

// Create block to be able to calculate its hash
block := NewL2Block(l2Header, transactions, []*L2Header{}, receipts, &trie.StackTrie{})
st := trie.NewStackTrie(nil)
block := NewL2Block(l2Header, transactions, []*L2Header{}, receipts, st)
block.ReceivedAt = time.Unix(int64(l2Block.Timestamp), 0)

for _, receipt := range receipts {
Expand Down

0 comments on commit 1825164

Please sign in to comment.