rewardserver

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerRewards

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

func (*ConsumerRewards) PrepareRewardsForClaim

func (csrw *ConsumerRewards) PrepareRewardsForClaim() (retProofs []*pairingtypes.RelaySession, errRet error)

type EpochRewards

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

type PaymentRequest

type PaymentRequest struct {
	CU                  uint64
	BlockHeightDeadline int64
	Amount              sdk.Coin
	Client              sdk.AccAddress
	UniqueIdentifier    uint64
	Description         string
	ChainID             string
}

func BuildPaymentFromRelayPaymentEvent

func BuildPaymentFromRelayPaymentEvent(event terderminttypes.Event, block int64) ([]*PaymentRequest, error)

func (*PaymentRequest) String

func (pr *PaymentRequest) String() string

type RewardServer

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

func NewRewardServer

func NewRewardServer(rewardsTxSender RewardsTxSender, providerMetrics *metrics.ProviderMetricsManager) *RewardServer

func (*RewardServer) Description

func (rws *RewardServer) Description() string

func (*RewardServer) PaymentHandler

func (rws *RewardServer) PaymentHandler(payment *PaymentRequest)

func (*RewardServer) RemoveExpectedPayment

func (rws *RewardServer) RemoveExpectedPayment(paidCUToFInd uint64, expectedClient sdk.AccAddress, blockHeight int64, uniqueID uint64, chainID string) bool

func (*RewardServer) SendNewProof

func (rws *RewardServer) SendNewProof(ctx context.Context, proof *pairingtypes.RelaySession, epoch uint64, consumerAddr, apiInterface string) (existingCU uint64, updatedWithProof bool)

func (*RewardServer) SubscribeEnded

func (rws *RewardServer) SubscribeEnded(consumer string, epoch uint64, subscribeID string)

func (*RewardServer) SubscribeStarted

func (rws *RewardServer) SubscribeStarted(consumer string, epoch uint64, subscribeID string)

func (*RewardServer) UpdateEpoch

func (rws *RewardServer) UpdateEpoch(epoch uint64)

type RewardsTxSender

type RewardsTxSender interface {
	TxRelayPayment(ctx context.Context, relayRequests []*pairingtypes.RelaySession, description string) error
	GetEpochSizeMultipliedByRecommendedEpochNumToCollectPayment(ctx context.Context) (uint64, error)
	EarliestBlockInMemory(ctx context.Context) (uint64, error)
}

Jump to

Keyboard shortcuts

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