cstesting

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cstesting defines helpers to test Chainscripts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeMapID added in v0.2.0

func ChangeMapID(l *cs.Link) *cs.Link

ChangeMapID clones a link and randomly changes its map ID.

func ChangeState added in v0.2.0

func ChangeState(l *cs.Link) *cs.Link

ChangeState clones a link and randomly changes its state.

func Clone added in v0.2.0

func Clone(l *cs.Link) *cs.Link

Clone clones a link.

func CreateLink(process, mapID, prevLinkHash string, tags []interface{}, priority float64) *cs.Link

CreateLink creates a minimal link.

func InvalidLinkWithProcess added in v0.2.0

func InvalidLinkWithProcess(process string) *cs.Link

InvalidLinkWithProcess creates a random invalid link.

func RandomBranch

func RandomBranch(parent *cs.Link) *cs.Link

RandomBranch appends a random link to a link.

func RandomEvidence added in v0.2.0

func RandomEvidence() *cs.Evidence

RandomEvidence creates a random evidence.

func RandomLink() *cs.Link

RandomLink creates a random link.

func RandomLinkWithProcess added in v0.2.0

func RandomLinkWithProcess(process string) *cs.Link

RandomLinkWithProcess creates a random link in a specific process.

func RandomSegment

func RandomSegment() *cs.Segment

RandomSegment creates a random segment.

func RandomTags

func RandomTags() []interface{}

RandomTags creates between zero and four random tags.

Types

This section is empty.

Jump to

Keyboard shortcuts

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