shadow

package
v0.0.0-...-d35ede9 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewKeyPerInvoke

type NewKeyPerInvoke struct {
	sync.Mutex
	// contains filtered or unexported fields
}

NewKeyPerInvoke is the shadow implementation for NewKeyPerInvoke in the parent package The shadow provides invoke arguments that are guaranteed to be result in unique ledger entries as long as the parameters to GetInvokeArgs are unique

func (*NewKeyPerInvoke) GetInvokeArgs

func (t *NewKeyPerInvoke) GetInvokeArgs(ccnum int, iter int) [][]byte

GetInvokeArgs get args for invoke based on chaincode ID and iteration num

func (*NewKeyPerInvoke) GetNumQueries

func (t *NewKeyPerInvoke) GetNumQueries(numInvokesCompletedSuccessfully int) int

GetNumQueries returns the number of queries shadow wants ccchecked to do. For our purpose, just do as many queries as there were invokes for.

func (*NewKeyPerInvoke) GetQueryArgs

func (t *NewKeyPerInvoke) GetQueryArgs(ccnum int, iter int) [][]byte

GetQueryArgs returns the query for the iter to test against

func (*NewKeyPerInvoke) InitShadowCC

func (t *NewKeyPerInvoke) InitShadowCC(initArgs []string)

InitShadowCC initializes CC

func (*NewKeyPerInvoke) OverrideNumInvokes

func (t *NewKeyPerInvoke) OverrideNumInvokes(numInvokesPlanned int) int

OverrideNumInvokes returns the number of invokes shadow wants accept users request, no override

func (*NewKeyPerInvoke) PostInvoke

func (t *NewKeyPerInvoke) PostInvoke(args [][]byte, resp []byte) error

PostInvoke store the key/val for later verification

func (*NewKeyPerInvoke) Validate

func (t *NewKeyPerInvoke) Validate(args [][]byte, value []byte) error

Validate the key/val with mem storage

Jump to

Keyboard shortcuts

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