Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultRandomOpts() pchtest.RandomOpt
- func FundAll(ctx context.Context, funders []*channel.Funder, reqs []*pchannel.FundingReq) error
- func NewRandL2Account() (wallet.Account, error)
- func WithBalancesRange() pchtest.RandomOpt
- type DepositSetup
- type Setup
- func (s *Setup) AssertNoRegistered(cid pchannel.ID)
- func (s *Setup) AssertRegistered(cid pchannel.ID)
- func (s *Setup) GetChannelBalances(cid pchannel.ID) ([]uint64, error)
- func (s *Setup) GetL1Balances() ([]uint64, error)
- func (s *Setup) GetPerunBalances() ([]uint64, error)
- func (s *Setup) NewCtx() context.Context
- func (s *Setup) NewRandomParamAndState() (*pchannel.Params, *pchannel.State)
- type TransferSetup
Constants ¶
View Source
const ( // MaxBalance that will be used for deposit testing. MaxBalance = uint64(1) << 30 // MinBalance is the minimal amount that will to be deposited. MinBalance = uint64(1) << 20 )
View Source
const ( Host = "http://127.0.0.1" Port = 4943 )
Variables ¶
View Source
var DefaultTestTimeout = 200
Functions ¶
func DefaultRandomOpts ¶
DefaultRandomOpts returns the default options for tests value random generation.
func NewRandL2Account ¶
func WithBalancesRange ¶
WithBalancesRange specifies the Balances range.
Types ¶
type DepositSetup ¶
type DepositSetup struct { FReqs []*pchannel.FundingReq FIDs []uint64 FinalBals []pchannel.Bal DReqs []*channel.DepositReq }
func NewDepositSetup ¶
type Setup ¶
type Setup struct { T *testing.T Rng *rand.Rand L1Accs []*principal.Principal L2Accs []wallet.Account ICConns []*chanconn.Connector }
func NewTestSetup ¶
func (*Setup) AssertNoRegistered ¶
func (*Setup) AssertRegistered ¶
func (*Setup) GetChannelBalances ¶
func (*Setup) GetL1Balances ¶
func (*Setup) GetPerunBalances ¶
Click to show internal directories.
Click to hide internal directories.