testing

package
v0.0.0-...-c626c17 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPECULATIVE = DBReadMode(iota)
	HEADER      //HEAD
	READONLY
	IRREVERSIBLE
)
View Source
const (
	FULL = ValidationMode(iota)
	LIGHT
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainTester

type ChainTester struct {
	Control  *Controller
	KeyPairs map[common.AccountName]common.Pair //[]<pubKey, priKey>
}

func NewChainTester

func NewChainTester(when types.BlockTimeStamp, names ...common.AccountName) *ChainTester

func (*ChainTester) NewHeaderStateTester

func (t *ChainTester) NewHeaderStateTester(when types.BlockTimeStamp) *types.BlockHeaderState

func (*ChainTester) NewProducerScheduleTester

func (t *ChainTester) NewProducerScheduleTester(names ...common.AccountName) types.ProducerScheduleType

func (*ChainTester) NewSignedBlockTester

func (t *ChainTester) NewSignedBlockTester(bhs *types.BlockHeaderState) *types.SignedBlock

type Controller

type Controller struct {
	// contains filtered or unexported fields
}
var Control *Controller

func GetControllerInstance

func GetControllerInstance() *Controller

func (*Controller) AbortBlock

func (c *Controller) AbortBlock()

func (*Controller) AddResourceGreyList

func (c *Controller) AddResourceGreyList(name *common.AccountName)

func (*Controller) ApplyBlock

func (c *Controller) ApplyBlock(b *types.SignedBlock)

func (*Controller) CommitBlock

func (c *Controller) CommitBlock(addToForkDb bool)

func (*Controller) DropUnappliedTransaction

func (c *Controller) DropUnappliedTransaction(trx *types.TransactionMetadata)

func (*Controller) FetchBlockById

func (c *Controller) FetchBlockById(id common.BlockIdType) *types.SignedBlock

func (*Controller) FetchBlockByNumber

func (c *Controller) FetchBlockByNumber(num uint32) *types.SignedBlock

func (*Controller) FinalizeBlock

func (c *Controller) FinalizeBlock()

func (*Controller) GetActionBlackList

func (c *Controller) GetActionBlackList() *NamePairSet

func (*Controller) GetActorBlackList

func (c *Controller) GetActorBlackList() *AccountNameSet

func (*Controller) GetActorWhiteList

func (c *Controller) GetActorWhiteList() *AccountNameSet

func (*Controller) GetContractBlackList

func (c *Controller) GetContractBlackList() *AccountNameSet

func (*Controller) GetContractWhiteList

func (c *Controller) GetContractWhiteList() *AccountNameSet

func (*Controller) GetKeyBlackList

func (c *Controller) GetKeyBlackList() *PublicKeySet

func (*Controller) GetReadMode

func (c *Controller) GetReadMode() DBReadMode

func (*Controller) GetResourceGreyList

func (c *Controller) GetResourceGreyList() *AccountNameSet

func (*Controller) GetScheduledTransactions

func (c *Controller) GetScheduledTransactions() []common.TransactionIdType

func (*Controller) GetUnappliedTransactions

func (c *Controller) GetUnappliedTransactions() []*types.TransactionMetadata

func (*Controller) GetValidationMode

func (c *Controller) GetValidationMode() ValidationMode

func (*Controller) HeadBlockNum

func (c *Controller) HeadBlockNum() uint32

func (*Controller) HeadBlockState

func (c *Controller) HeadBlockState() *types.BlockState

func (*Controller) HeadBlockTime

func (c *Controller) HeadBlockTime() common.TimePoint

func (*Controller) IsKnownUnexpiredTransaction

func (c *Controller) IsKnownUnexpiredTransaction(id *common.TransactionIdType) bool

func (*Controller) LastIrreversibleBlockNum

func (c *Controller) LastIrreversibleBlockNum() uint32

func (*Controller) MaybeSwitchForks

func (c *Controller) MaybeSwitchForks()

func (*Controller) PendingBlockState

func (c *Controller) PendingBlockState() *types.BlockState

func (*Controller) PendingBlockTime

func (c *Controller) PendingBlockTime() common.TimePoint

func (*Controller) PushBlock

func (c *Controller) PushBlock(b *types.SignedBlock, status types.BlockStatus)

func (*Controller) PushReceipt

func (c *Controller) PushReceipt(trx interface{}) types.TransactionReceipt

func (*Controller) PushScheduledTransaction

func (c *Controller) PushScheduledTransaction(trx *common.TransactionIdType, deadline common.TimePoint, billedCpuTimeUs uint32) *types.TransactionTrace

func (*Controller) PushTransaction

func (c *Controller) PushTransaction(trx *types.TransactionMetadata, deadline common.TimePoint, billedCpuTimeUs uint32) *types.TransactionTrace

func (*Controller) RemoveResourceGreyList

func (c *Controller) RemoveResourceGreyList(name *common.AccountName)

func (*Controller) SetActionBlackList

func (c *Controller) SetActionBlackList(params *NamePairSet)

func (*Controller) SetActorBlackList

func (c *Controller) SetActorBlackList(params *AccountNameSet)

func (*Controller) SetActorWhiteList

func (c *Controller) SetActorWhiteList(params *AccountNameSet)

func (*Controller) SetContractBlackList

func (c *Controller) SetContractBlackList(params *AccountNameSet)

func (*Controller) SetContractWhiteList

func (c *Controller) SetContractWhiteList(params *AccountNameSet)

func (*Controller) SetKeyBlackList

func (c *Controller) SetKeyBlackList(params *PublicKeySet)

func (*Controller) SetSubjectiveCpuLeeway

func (c *Controller) SetSubjectiveCpuLeeway(leeway common.Microseconds)

func (*Controller) SignBlock

func (c *Controller) SignBlock(callback func(sha256 crypto.Sha256) ecc.Signature) *types.SignedBlock

func (*Controller) StartBlock

func (c *Controller) StartBlock(when types.BlockTimeStamp, confirmBlockCount uint16)

type DBReadMode

type DBReadMode = chain.DBReadMode

type ValidationMode

type ValidationMode = chain.ValidationMode

Jump to

Keyboard shortcuts

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