model

package
v0.0.0-...-ae8e89f Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBlockTag   = uint32(1)
	EventIdStartValue = int64(1)
	EventIdDeleted    = int64(0)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockEvent

type BlockEvent struct {
	EventType      api.BlockchainEvent_Type
	BlockHash      string
	BlockHeight    uint64
	ParentHash     string
	Tag            uint32
	Skipped        bool
	BlockTimestamp int64
}

func NewBlockEvent

func NewBlockEvent(eventType api.BlockchainEvent_Type, blockHash string, parentHash string, blockHeight uint64, tag uint32, skipped bool, blockTimestamp int64) *BlockEvent

func NewBlockEventFromEventEntry

func NewBlockEventFromEventEntry(eventType api.BlockchainEvent_Type, entry *EventEntry) *BlockEvent

func NewBlockEventWithBlockMeta

func NewBlockEventWithBlockMeta(eventType api.BlockchainEvent_Type, block *api.BlockMetadata) *BlockEvent

func (*BlockEvent) GetBlockHeight

func (e *BlockEvent) GetBlockHeight() uint64

func (*BlockEvent) GetBlockSkipped

func (e *BlockEvent) GetBlockSkipped() bool

func (*BlockEvent) GetBlockTimestamp

func (e *BlockEvent) GetBlockTimestamp() int64

type EventEntry

type EventEntry struct {
	EventId        int64
	EventType      api.BlockchainEvent_Type
	BlockHeight    uint64
	BlockHash      string
	Tag            uint32
	ParentHash     string
	MaxEventId     int64
	BlockSkipped   bool
	EventTag       uint32
	BlockTimestamp int64
}

func CastItemToEventEntry

func CastItemToEventEntry(outputItem any) (*EventEntry, bool)

func ConvertBlockEventsToEventEntries

func ConvertBlockEventsToEventEntries(blockEvents []*BlockEvent, eventTag uint32, eventId int64) []*EventEntry

func NewEventEntry

func NewEventEntry(eventTag uint32, eventId int64, inputEvent *BlockEvent) *EventEntry

type Transaction

type Transaction struct {
	Hash        string
	BlockNumber uint64
	BlockHash   string
	BlockTag    uint32
}

Jump to

Keyboard shortcuts

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