pool

package
v5.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolEntry

type PoolEntry struct {
	// Info on where this tx originated from.
	Src TxSource `json:"src"`
	// Timestamp of when this tx was originally added to the pool.
	TxAt string `json:"tx_at"`
	// The transaction itself.
	Tx core.Transaction `json:"tx"`
}

PoolEntry represents a single entry in the pool. A single (possibly aggregated) transaction.

type TxSource

type TxSource int

TxSource is used to make decisions based on transaction acceptance priority from various sources. For example, a node may want to bypass pool size restrictions when accepting a transaction from a local wallet.

Most likely this will evolve to contain some sort of network identifier, once we get a better sense of what transaction building might look like.

const (
	// PushAPITxSource when the tx is pushed via API
	PushAPITxSource TxSource = iota
	// BroadcastTxSource when the source is a broadcats
	BroadcastTxSource
	// FluffTxSource zhen the source is our own fluff
	FluffTxSource
	// EmbargoExpiredTxSource when the source is an expired embargo
	EmbargoExpiredTxSource
	// DeaggregateTxSource when the source is the deaggregation
	DeaggregateTxSource
)

func (TxSource) MarshalJSON

func (s TxSource) MarshalJSON() ([]byte, error)

MarshalJSON marshals the enum as a quoted json string

func (*TxSource) UnmarshalJSON

func (s *TxSource) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a quoted json string to the enum value

Jump to

Keyboard shortcuts

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