extpool

package
v0.97.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool represents pool of extensible payloads.

func New

func New(bc blockchainer.Blockchainer, capacity int) *Pool

New returns new payload pool using provided chain.

func (*Pool) Add

func (p *Pool) Add(e *payload.Extensible) (bool, error)

Add adds extensible payload to the pool. First return value specifies if payload was new. Second one is nil if and only if payload is valid.

func (*Pool) Get

func (p *Pool) Get(h util.Uint256) *payload.Extensible

Get returns payload by hash.

func (*Pool) RemoveStale

func (p *Pool) RemoveStale(index uint32)

RemoveStale removes invalid payloads after block processing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL