test

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deposit

type Deposit struct {
	FundingTxHash          bitcoin.Hash
	FundingOutputIndex     uint32
	FundingTxConfirmations uint
	FundingTx              *bitcoin.Transaction

	WalletPublicKeyHash [20]byte

	RevealBlockNumber uint64
	SweptAt           time.Time
}

Deposit holds the deposit data in the given test scenario.

type FindDepositsToSweepTestScenario

type FindDepositsToSweepTestScenario struct {
	Title string

	MaxNumberOfDeposits uint16
	WalletPublicKeyHash [20]byte

	Deposits []*Deposit

	ExpectedUnsweptDeposits []*tbtcpg.DepositReference

	SweepTxFee             int64
	EstimateSatPerVByteFee int64
}

FindDepositsToSweepTestScenario represents a test scenario of finding deposits to sweep.

func LoadFindDepositsToSweepTestScenario

func LoadFindDepositsToSweepTestScenario() ([]*FindDepositsToSweepTestScenario, error)

LoadFindDepositsToSweepTestScenario loads all scenarios related with deposit sweep.

func (*FindDepositsToSweepTestScenario) UnmarshalJSON

func (dsts *FindDepositsToSweepTestScenario) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a custom JSON unmarshaling logic to produce a proper FindDepositsToSweepTestScenario.

type FindPendingRedemptionsTestScenario

type FindPendingRedemptionsTestScenario struct {
	Title string

	ChainParameters struct {
		AverageBlockTime time.Duration
		CurrentBlock     uint64
		RequestTimeout   uint32
		RequestMinAge    uint32
	}

	MaxNumberOfRequests uint16
	WalletPublicKeyHash [20]byte

	PendingRedemptions []*RedemptionRequest

	ExpectedRedeemersOutputScripts []bitcoin.Script
}

FindPendingRedemptionsTestScenario represents a test scenario of finding pending redemptions.

func LoadFindPendingRedemptionsTestScenario

func LoadFindPendingRedemptionsTestScenario() (
	[]*FindPendingRedemptionsTestScenario,
	error,
)

LoadFindPendingRedemptionsTestScenario loads all scenarios related with finding pending redemptions.

func (*FindPendingRedemptionsTestScenario) UnmarshalJSON

func (fprts *FindPendingRedemptionsTestScenario) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a custom JSON unmarshaling logic to produce a proper FindPendingRedemptionsTestScenario.

type ProposeSweepDepositsData

type ProposeSweepDepositsData struct {
	tbtcpg.DepositReference

	Transaction            *bitcoin.Transaction
	FundingTxConfirmations uint
}

type ProposeSweepTestScenario

type ProposeSweepTestScenario struct {
	Title string

	WalletPublicKeyHash          [20]byte
	DepositTxMaxFee              uint64
	Deposits                     []*ProposeSweepDepositsData
	SweepTxFee                   int64
	EstimateSatPerVByteFee       int64
	ExpectedDepositSweepProposal *tbtc.DepositSweepProposal
	ExpectedErr                  error
}

ProposeSweepTestScenario represents a test scenario of proposing deposits sweep.

func LoadProposeSweepTestScenario

func LoadProposeSweepTestScenario() ([]*ProposeSweepTestScenario, error)

LoadProposeSweepTestScenario loads all scenarios related with deposit sweep.

func (*ProposeSweepTestScenario) DepositsReferences

func (psts *ProposeSweepTestScenario) DepositsReferences() []*tbtcpg.DepositReference

func (*ProposeSweepTestScenario) UnmarshalJSON

func (psts *ProposeSweepTestScenario) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a custom JSON unmarshaling logic to produce a proper ProposeSweepTestScenario.

type RedemptionRequest

type RedemptionRequest struct {
	WalletPublicKeyHash  [20]byte
	RedeemerOutputScript bitcoin.Script
	RequestedAmount      uint64
	RequestedAt          time.Time
	RequestBlock         uint64
}

RedemptionRequest holds the redemption request data in the given test scenario.

Jump to

Keyboard shortcuts

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