Documentation ¶
Overview ¶
Package provider implements the cchain.Provider interface.
Index ¶
- Variables
- func IsErrHistoryPruned(err error) bool
- type Provider
- func (p Provider) AllAttestationsFrom(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64) ([]xchain.Attestation, error)
- func (p Provider) AttestationsFrom(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64) ([]xchain.Attestation, error)
- func (p Provider) CometClient() rpcclient.Client
- func (p Provider) CurrentUpgradePlan(ctx context.Context) (upgradetypes.Plan, bool, error)
- func (p Provider) GenesisFiles(ctx context.Context) (execution []byte, consensus []byte, err error)
- func (p Provider) LatestAttestation(ctx context.Context, chainVer xchain.ChainVersion) (xchain.Attestation, bool, error)
- func (p Provider) PortalValidatorSet(ctx context.Context, valSetID uint64) ([]cchain.PortalValidator, bool, error)
- func (p Provider) Portals(ctx context.Context) ([]*rtypes.Portal, bool, error)
- func (p Provider) SDKRewards(ctx context.Context, operator common.Address) (float64, bool, error)
- func (p Provider) SDKSigningInfos(ctx context.Context) ([]cchain.SDKSigningInfo, error)
- func (p Provider) SDKValidator(ctx context.Context, operator common.Address) (cchain.SDKValidator, bool, error)
- func (p Provider) SDKValidators(ctx context.Context) ([]cchain.SDKValidator, error)
- func (p Provider) StreamAsync(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64, ...)
- func (p Provider) StreamAttestations(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64, ...) error
- func (p Provider) WindowCompare(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64) (int, error)
- func (p Provider) XBlock(ctx context.Context, height uint64, latest bool) (xchain.Block, bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHistoryPruned = errors.New("no commit info found (history pruned)")
ErrHistoryPruned indicates that the necessary state for the requested height isn't found in the store.
Functions ¶
func IsErrHistoryPruned ¶
IsErrHistoryPruned reports whether the input error matches the CosmosSDK errors returned when the state for the requested height isn't found in the store.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements cchain.Provider.
func NewABCIProvider ¶
func NewProviderForT ¶
func NewProviderForT(_ *testing.T, fetch fetchFunc, latest latestFunc, window windowFunc, backoffFunc func(context.Context) func(), ) Provider
NewProviderForT creates a new provider for testing.
func (Provider) AllAttestationsFrom ¶
func (p Provider) AllAttestationsFrom(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64, ) ([]xchain.Attestation, error)
func (Provider) AttestationsFrom ¶
func (p Provider) AttestationsFrom(ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64, ) ([]xchain.Attestation, error)
func (Provider) CometClient ¶
func (Provider) CurrentUpgradePlan ¶
func (Provider) GenesisFiles ¶
func (Provider) LatestAttestation ¶
func (p Provider) LatestAttestation(ctx context.Context, chainVer xchain.ChainVersion, ) (xchain.Attestation, bool, error)
func (Provider) PortalValidatorSet ¶
func (Provider) SDKRewards ¶
func (Provider) SDKSigningInfos ¶
func (Provider) SDKValidator ¶
func (Provider) SDKValidators ¶
func (Provider) StreamAsync ¶
func (p Provider) StreamAsync( ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64, workerName string, callback cchain.ProviderCallback, )
func (Provider) StreamAttestations ¶
func (p Provider) StreamAttestations( ctx context.Context, chainVer xchain.ChainVersion, attestOffset uint64, workerName string, callback cchain.ProviderCallback, ) error
func (Provider) WindowCompare ¶
Click to show internal directories.
Click to hide internal directories.