tests

package
v0.0.0-...-be0f657 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientConfigMA

func ClientConfigMA() (ma.Multiaddr, string)

func CreateLocalDevnet

func CreateLocalDevnet(t *testing.T, numMiners int) (*ldevnet.LocalDevnet, address.Address, []address.Address, func())

func GetLotusToken

func GetLotusToken(lotusFolderPath string) (string, error)

func NewSimpleTx

func NewSimpleTx(ds datastore.Datastore) datastore.Txn

Types

type SimpleTx

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

SimpleTx implements the transaction interface for datastores who do not have any sort of underlying transactional support

func (*SimpleTx) Commit

func (bt *SimpleTx) Commit() error

func (*SimpleTx) Delete

func (bt *SimpleTx) Delete(key datastore.Key) error

func (*SimpleTx) Discard

func (bt *SimpleTx) Discard()

func (*SimpleTx) Get

func (bt *SimpleTx) Get(k datastore.Key) ([]byte, error)

func (*SimpleTx) GetSize

func (bt *SimpleTx) GetSize(k datastore.Key) (int, error)

func (*SimpleTx) Has

func (bt *SimpleTx) Has(k datastore.Key) (bool, error)

func (*SimpleTx) Put

func (bt *SimpleTx) Put(key datastore.Key, val []byte) error

func (*SimpleTx) Query

func (bt *SimpleTx) Query(q query.Query) (query.Results, error)

type TxMapDatastore

type TxMapDatastore struct {
	*datastore.MapDatastore
	// contains filtered or unexported fields
}

TxMapDatastore is a in-memory datastore that satisfies TxnDatastore

func NewTxMapDatastore

func NewTxMapDatastore() *TxMapDatastore

func (*TxMapDatastore) NewTransaction

func (d *TxMapDatastore) NewTransaction(readOnly bool) (datastore.Txn, error)

Jump to

Keyboard shortcuts

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