faucet_test

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPoWScore     = 10
	ProtocolVersion = 2
	BelowMaxDepth   = 15
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FaucetTestEnv

type FaucetTestEnv struct {
	TestEnv *testsuite.TestEnvironment

	GenesisWallet *utils.HDWallet
	FaucetWallet  *utils.HDWallet
	Wallet1       *utils.HDWallet
	Wallet2       *utils.HDWallet
	Wallet3       *utils.HDWallet

	Faucet *faucet.Faucet
	// contains filtered or unexported fields
}

func NewFaucetTestEnv

func NewFaucetTestEnv(t *testing.T,
	faucetBalance uint64,
	wallet1Balance uint64,
	wallet2Balance uint64,
	wallet3Balance uint64,
	faucetAmount uint64,
	faucetSmallAmount uint64,
	faucetMaxAddressBalance uint64,
	assertSteps bool) *FaucetTestEnv

func (*FaucetTestEnv) AssertAddressUTXOCount

func (env *FaucetTestEnv) AssertAddressUTXOCount(address iotago.Address, expected int)

func (*FaucetTestEnv) AssertFaucetBalance

func (env *FaucetTestEnv) AssertFaucetBalance(expected uint64)

func (*FaucetTestEnv) Cleanup

func (env *FaucetTestEnv) Cleanup()

func (*FaucetTestEnv) ConfirmedMilestoneIndex

func (env *FaucetTestEnv) ConfirmedMilestoneIndex() iotago.MilestoneIndex

func (*FaucetTestEnv) FlushRequestsAndConfirmNewFaucetBlock

func (env *FaucetTestEnv) FlushRequestsAndConfirmNewFaucetBlock() error

FlushRequestsAndConfirmNewFaucetBlock flushes pending faucet requests, waits until the next faucet block is issued and issues a milestone on top of it.

func (*FaucetTestEnv) IssueMilestone

func (*FaucetTestEnv) ProtocolParameters

func (env *FaucetTestEnv) ProtocolParameters() *iotago.ProtocolParameters

func (*FaucetTestEnv) RequestFunds

func (env *FaucetTestEnv) RequestFunds(wallets ...*utils.HDWallet) (iotago.BlockIDs, error)

RequestFunds sends requests to the faucet and waits until the next faucet block is issued.

func (*FaucetTestEnv) RequestFundsAndIssueMilestone

func (env *FaucetTestEnv) RequestFundsAndIssueMilestone(wallets ...*utils.HDWallet) error

RequestFundsAndIssueMilestone sends requests to the faucet, waits until the next faucet block is issued and issues a milestone on top of it.

Jump to

Keyboard shortcuts

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