suites

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const PaymentChannelClosingDelay = 6 * 60 * 2 // six hours

taken from lotus /build/params_shared.go

Variables

View Source
var (
	TotalNetworkBalance = types.NewInt(types.NewInt(1).Mul(types.NewInt(totalFilecoin).Int, types.NewInt(0).SetUint64(filecoinPrecision)).Uint64())
)

Functions

func AccountValueTransferFromKnownToUnknownAccount

func AccountValueTransferFromKnownToUnknownAccount(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferFromUnknownToKnownAccount

func AccountValueTransferFromUnknownToKnownAccount(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferFromUnknownToUnknownAccount

func AccountValueTransferFromUnknownToUnknownAccount(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferOverBalanceNonZero

func AccountValueTransferOverBalanceNonZero(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferOverBalanceZero

func AccountValueTransferOverBalanceZero(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferSuccess

func AccountValueTransferSuccess(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferToSelf

func AccountValueTransferToSelf(t *testing.T, factory Factories, expGasUsed uint64)

func AccountValueTransferZeroFunds

func AccountValueTransferZeroFunds(t *testing.T, factory Factories, expGasUsed uint64)

func CreateStorageMinerAndUpdatePeerID

func CreateStorageMinerAndUpdatePeerID(t testing.TB, factory Factories)

func MultiSigActorConstructor added in v0.0.2

func MultiSigActorConstructor(t testing.TB, factory Factories)

func MultiSigActorProposeApprove added in v0.0.2

func MultiSigActorProposeApprove(t testing.TB, factory Factories)

func MultiSigActorProposeCancel added in v0.0.2

func MultiSigActorProposeCancel(t testing.TB, factory Factories)

func PayChActorConstructor added in v0.0.3

func PayChActorConstructor(t testing.TB, factory Factories)

func PayChActorUpdate added in v0.0.3

func PayChActorUpdate(t testing.TB, factory Factories)

func RequireIntPeerID

func RequireIntPeerID(t testing.TB, i int64) peer.ID

RequireIntPeerID takes in an integer and creates a unique peer id for it.

func StorageMarketActorConstructor added in v0.0.5

func StorageMarketActorConstructor(t testing.TB, factory Factories)

func StorageMarketBalanceUpdates added in v0.0.5

func StorageMarketBalanceUpdates(t testing.TB, factory Factories)

func StorageMarketStoragePublishDeal added in v0.0.5

func StorageMarketStoragePublishDeal(t testing.TB, factory Factories)

func StoragePowerActorConstructor added in v0.0.4

func StoragePowerActorConstructor(t testing.TB, factory Factories)

func StoragePowerActorCreateStorageMiner added in v0.0.4

func StoragePowerActorCreateStorageMiner(t testing.TB, factory Factories)

func StoragePowerActorUpdateStorage added in v0.0.4

func StoragePowerActorUpdateStorage(t testing.TB, factory Factories)

Types

type Candy added in v0.0.5

type Candy interface {
	TB() testing.TB
	Driver() *StateDriver
	Producer() *chain.MessageProducer
	Validator() *chain.Validator
	ExeCtx() *chain.ExecutionContext
}

I kinda hate this name

func NewCandy added in v0.0.5

func NewCandy(t testing.TB, factory Factories, singletons map[actors.SingletonActorID]types.BigInt) Candy

type Factories

type Factories interface {
	NewState() state.Wrapper
	NewMessageFactory(wrapper state.Wrapper) chain.MessageFactory

	chain.Applier
}

Factories wraps up all the implementation-specific integration points.

type StateDriver

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

StateDriver mutates and inspects a state.

func NewStateDriver

func NewStateDriver(tb testing.TB, w state.Wrapper) *StateDriver

NewStateDriver creates a new state driver for a state.

func (*StateDriver) AssertBalance

func (d *StateDriver) AssertBalance(addr address.Address, expected uint64)

TODO add an assertBalancChanged method that can be used until gas is worked out. will need to track previous balances, could be tricky. AssertBalance checks an actor has an expected balance.

func (*StateDriver) AssertMinerInfo

func (d *StateDriver) AssertMinerInfo(miner, expected strgminr.MinerInfo)

func (*StateDriver) AssertMultisigState added in v0.0.2

func (d *StateDriver) AssertMultisigState(multisigAddr address.Address, expected multsig.MultiSigActorState)

func (*StateDriver) AssertPayChState added in v0.0.3

func (d *StateDriver) AssertPayChState(paychAddr address.Address, expected paych.PaymentChannelActorState)

func (*StateDriver) AssertReceipt

func (d *StateDriver) AssertReceipt(receipt, expected chain.MessageReceipt)

AssertReceipt checks that a receipt is not nill and has values equal to `expected`.

func (*StateDriver) AssertStorageMarketHasOnChainDeal added in v0.0.5

func (d *StateDriver) AssertStorageMarketHasOnChainDeal(smaddr address.Address, dealID uint64, expected strgmrkt.OnChainDeal)

func (*StateDriver) AssertStorageMarketParticipantAvailableBalance added in v0.0.5

func (d *StateDriver) AssertStorageMarketParticipantAvailableBalance(smaddr, participant address.Address, available types.BigInt)

func (*StateDriver) AssertStorageMarketParticipantLockedBalance added in v0.0.5

func (d *StateDriver) AssertStorageMarketParticipantLockedBalance(smaddr, participant address.Address, locked types.BigInt)

func (*StateDriver) AssertStorageMarketState added in v0.0.5

func (d *StateDriver) AssertStorageMarketState(smaddr address.Address, expected strgmrkt.StorageMarketState)

func (*StateDriver) AssertStoragePowerState added in v0.0.4

func (d *StateDriver) AssertStoragePowerState(spAddr address.Address, expected strgpwr.StoragePowerState)

func (*StateDriver) NewAccountActor

func (d *StateDriver) NewAccountActor(balanceAttoFil uint64) address.Address

NewAccountActor installs a new account actor, returning the address.

func (*StateDriver) NewAccountActorBigBalance

func (d *StateDriver) NewAccountActorBigBalance(balanceAttoFil types.BigInt) address.Address

func (*StateDriver) State

func (d *StateDriver) State() state.Wrapper

State returns the state.

Jump to

Keyboard shortcuts

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