Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeadChangeStackBuffer ¶
type HeadChangeStackBuffer struct {
// contains filtered or unexported fields
}
func NewHeadChangeStackBuffer ¶
func NewHeadChangeStackBuffer(size int) *HeadChangeStackBuffer
NewHeadChangeStackBuffer buffer HeadChange events to avoid having to deal with revert changes. Initialized size should be the average reorg size + 1
func (*HeadChangeStackBuffer) Pop ¶
func (h *HeadChangeStackBuffer) Pop()
Pop removes the last added HeadChange
func (*HeadChangeStackBuffer) Push ¶
func (h *HeadChangeStackBuffer) Push(hc *api.HeadChange) (rethc *api.HeadChange)
Push adds a HeadChange to stack buffer. If the length of the stack buffer grows larger than the initizlized size, the oldest HeadChange is returned.
Click to show internal directories.
Click to hide internal directories.