Skip to content

Commit

Permalink
Merge pull request #4470 from Build-Squad/boriskozlov/prototypeofremo…
Browse files Browse the repository at this point in the history
…vingnulladress
  • Loading branch information
peterargue authored Jul 31, 2023
2 parents 115432e + ae190fc commit cc1eac5
Show file tree
Hide file tree
Showing 4 changed files with 398 additions and 233 deletions.
11 changes: 7 additions & 4 deletions module/mempool/herocache/backdata/heropool/linkedlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ package heropool

// link represents a slice-based doubly linked-list node that
// consists of a next and previous poolIndex.
// if a link doesn't belong to any state it's next and prev should hold InvalidIndex.
type link struct {
next poolIndex
prev poolIndex
next EIndex
prev EIndex
}

// state represents a doubly linked-list by its head and tail pool indices.
// If state has 0 size, its tail's and head's prev and next are treated as invalid and should hold InvalidIndex values.
type state struct {
head poolIndex
tail poolIndex
head EIndex
tail EIndex
size uint32
}
Loading

0 comments on commit cc1eac5

Please sign in to comment.