mempoolevent

package
v0.97.1-pre Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 3 Imported by: 14

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 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 input string into an Type if it's possible.

func (Type) MarshalJSON

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

MarshalJSON implements 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 json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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