fill

package
v0.0.0-...-24f9576 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the underlying struct for the watched address gap filling service

func New

func New(config *serve.Config) *Service

NewServer creates a new Service

func (*Service) GetFillAddresses

func (s *Service) GetFillAddresses(rows []WatchedAddress) ([]WatchedAddress, uint64, uint64)

GetFillAddresses finds the encompassing range to perform fill for the given watched addresses it also sets the address specific fill range

func (*Service) Start

func (s *Service) Start(wg *sync.WaitGroup)

Start is used to begin the service

func (*Service) Stop

func (s *Service) Stop()

Stop is used to gracefully stop the service

func (*Service) UpdateLastFilledAt

func (s *Service) UpdateLastFilledAt(blockNumber uint64, fillAddresses []interface{})

UpdateLastFilledAt updates the fill status for the provided addresses in the db

type WatchedAddress

type WatchedAddress struct {
	Address      string `db:"address"`
	CreatedAt    uint64 `db:"created_at"`
	WatchedAt    uint64 `db:"watched_at"`
	LastFilledAt uint64 `db:"last_filled_at"`

	StartBlock uint64
	EndBlock   uint64
}

WatchedAddress type is used to process currently watched addresses

Jump to

Keyboard shortcuts

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