dbscan

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CornNethExitScanByDB_Example

func CornNethExitScanByDB_Example(ctx context.Context)

CornNethExitScanByDB_Example corn nETH exit scan by db example

func CornVnftExitScanByDB_Example

func CornVnftExitScanByDB_Example(ctx context.Context)

CornVnftExitScanByDB_Example corn vnft exit scan by db example

func NethExitScanByDB_Example

func NethExitScanByDB_Example(ctx context.Context) error

NethExitScanByDB_Example nETH large request exit scan by db example.

func VnftExitScanByDB_Example

func VnftExitScanByDB_Example(ctx context.Context) error

VnftExitScanByDB_Example vnft exit scan by db example

Types

type DBFilter

type DBFilter interface {
	exitscan.ExitFilter
	exitscan.WithdrawalRequestFilter
}

type DBFiltrate

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

func NewDBFiltrate

func NewDBFiltrate(
	network string,
	stakeType exitscan.StakeType,
	vnftOwnerValidator exitscan.VnftOwnerValidator,
) (*DBFiltrate, error)

func (*DBFiltrate) Filter

func (e *DBFiltrate) Filter(operatorId *big.Int, vnftContractExitRecords []*exitscan.VnftRecord) ([]*exitscan.VnftRecord, error)

Filter If some validator records for vnft ContractExitRecords have been marked as is_exit = true in the database, filtering. @param vnftContractExitRecords *[]exitscan.VnftRecord Unfiltered VnftRecord. @return []*exitscan.VnftRecord Filtered VnftRecord. ---------------------------------------------------------------- if dbCanExitValidatorCount!=needExitValidatorCount, return error The exitValidatorCount calculated by 'WithdrawalRequestFilter' filters out the specified number of VnftRecords again

func (*DBFiltrate) SetExitValidatorCounter

func (e *DBFiltrate) SetExitValidatorCounter(nethExitValidatorCounter exitscan.WithdrawalRequestExitValidatorCounter)

func (*DBFiltrate) WithdrawalRequestFilter

func (e *DBFiltrate) WithdrawalRequestFilter(operatorId *big.Int, withdrawalRequests []*exitscan.WithdrawalRequest) ([]*exitscan.WithdrawalRequest, error)

WithdrawalRequestFilter 1. Filter out the withdrawalRequests that have been exited. 2. and calculate the number of validators that nETH needs to exit, according to param withdrawalRequests ------------------------------------------------------------------------------------------------ !!! Call 'WithdrawalRequestFilter' before calling 'SetExitValidatorCounter'

type DBMark

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

func NewDBMark

func NewDBMark(network string) (*DBMark, error)

func (*DBMark) ExitMark

func (e *DBMark) ExitMark(operatorId *big.Int, vnftRecords []*exitscan.VnftRecord) error

ExitMark Mark the filtered Vnft Records as exiting for the next filter @param vnftRecords VNFT Records that need to be tagged

func (*DBMark) WithdrawalRequestMark

func (e *DBMark) WithdrawalRequestMark(operatorId *big.Int, withdrawalRequests []*exitscan.WithdrawalRequest) error

WithdrawalRequestMark Mark the filtered withdrawalRequests as deal for the next filter @param withdrawalRequests that need to be tagged

type DBMarker

type DBMarker interface {
	exitscan.ExitMarker
	exitscan.WithdrawalRequestMarker
}

Jump to

Keyboard shortcuts

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