mempoolevent

package
v0.99.2-pre Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Type Type
	Tx   *transaction.Transaction
	Data interface{}
}

Event represents one of mempool events: transaction was added or removed from the mempool.

type Type

type Type byte

Type represents mempool event type.

const (
	// TransactionAdded marks transaction addition mempool event.
	TransactionAdded Type = 0x01
	// TransactionRemoved marks transaction removal mempool event.
	TransactionRemoved Type = 0x02
)

func GetEventTypeFromString

func GetEventTypeFromString(s string) (Type, error)

GetEventTypeFromString converts the input string into the Type if it's possible.

func (Type) MarshalJSON

func (e Type) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Type) String

func (e Type) String() string

String is a Stringer implementation.

func (*Type) UnmarshalJSON

func (e *Type) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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