testutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Network

func Network() (*consensus.Network, types.Block)

Network returns a test network and genesis block.

Types

type EphemeralWalletStore

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

An EphemeralWalletStore is a Store that does not persist its state to disk. It is primarily useful for testing or as a reference implementation.

func NewEphemeralWalletStore

func NewEphemeralWalletStore(pk types.PrivateKey) *EphemeralWalletStore

NewEphemeralWalletStore returns a new EphemeralWalletStore.

func (*EphemeralWalletStore) Tip

Tip returns the last indexed tip of the wallet.

func (*EphemeralWalletStore) UnspentSiacoinElements

func (es *EphemeralWalletStore) UnspentSiacoinElements() (utxos []types.SiacoinElement, _ error)

UnspentSiacoinElements returns the wallet's unspent siacoin outputs.

func (*EphemeralWalletStore) UpdateChainState added in v0.0.4

func (es *EphemeralWalletStore) UpdateChainState(reverted []chain.RevertUpdate, applied []chain.ApplyUpdate) error

UpdateChainState applies and reverts chain updates to the wallet.

func (*EphemeralWalletStore) WalletEventCount added in v0.0.2

func (es *EphemeralWalletStore) WalletEventCount() (uint64, error)

WalletEventCount returns the number of events relevant to the wallet.

func (*EphemeralWalletStore) WalletEvents added in v0.0.2

func (es *EphemeralWalletStore) WalletEvents(offset, limit int) ([]wallet.Event, error)

WalletEvents returns the wallet's events.

Jump to

Keyboard shortcuts

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