blocks

package
v0.0.0-...-5a53b6d Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkBlocksProcessed

func MarkBlocksProcessed(ctx context.Context, db *sql.DB, blocks []ProcessedBlock) error

MarkBlocksProcessed marks multiple blocks as processed in a single transaction (safe, no string concatenation)

func WipeProcessedBlocks

func WipeProcessedBlocks(ctx context.Context, db *sql.DB) error

Types

type ProcessedBlock

type ProcessedBlock struct {
	Height      uint32
	Hash        chainhash.Hash
	BlockTime   time.Time
	ProcessedAt time.Time
	Txids       []chainhash.Hash
}

func GetProcessedBlock

func GetProcessedBlock(ctx context.Context, db *sql.DB, height uint32) (ProcessedBlock, error)

func GetProcessedTip

func GetProcessedTip(ctx context.Context, db *sql.DB) (*ProcessedBlock, error)

Jump to

Keyboard shortcuts

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