Documentation ¶
Index ¶
- func CornNethExitScanByDB_Example(ctx context.Context)
- func CornVnftExitScanByDB_Example(ctx context.Context)
- func NethExitScanByDB_Example(ctx context.Context) error
- func VnftExitScanByDB_Example(ctx context.Context) error
- type DBFilter
- type DBFiltrate
- func (e *DBFiltrate) Filter(operatorId *big.Int, vnftContractExitRecords []*exitscan.VnftRecord) ([]*exitscan.VnftRecord, error)
- func (e *DBFiltrate) SetExitValidatorCounter(nethExitValidatorCounter exitscan.WithdrawalRequestExitValidatorCounter)
- func (e *DBFiltrate) WithdrawalRequestFilter(operatorId *big.Int, withdrawalRequests []*exitscan.WithdrawalRequest) ([]*exitscan.WithdrawalRequest, error)
- type DBMark
- type DBMarker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CornNethExitScanByDB_Example ¶
CornNethExitScanByDB_Example corn nETH exit scan by db example
func CornVnftExitScanByDB_Example ¶
CornVnftExitScanByDB_Example corn vnft exit scan by db example
func NethExitScanByDB_Example ¶
NethExitScanByDB_Example nETH large request exit scan by db example.
func VnftExitScanByDB_Example ¶
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 (*DBMark) ExitMark ¶
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 }