testchain

package
v1.0.1-rc.17 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockedACSRunner

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

func NewMockedACSRunner

func NewMockedACSRunner(quorum uint16, log *logger.Logger) *MockedACSRunner

func (*MockedACSRunner) Close

func (acs *MockedACSRunner) Close()

func (*MockedACSRunner) RunACSConsensus

func (acs *MockedACSRunner) RunACSConsensus(value []byte, sessionID uint64, stateIndex uint32, callback func(sessionID uint64, acs [][]byte))

type MockedLedger added in v0.3.0

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

func NewMockedLedger added in v0.3.0

func NewMockedLedger(stateAddress iotago.Address, log *logger.Logger) (*MockedLedger, isc.ChainID)

func (*MockedLedger) GetAliasOutputByID added in v1.0.3

func (mlT *MockedLedger) GetAliasOutputByID(outputID iotago.OutputID) *iotago.AliasOutput

func (*MockedLedger) GetLatestOutput added in v0.3.0

func (mlT *MockedLedger) GetLatestOutput() *isc.AliasOutputWithID

func (*MockedLedger) GetOriginOutput added in v0.3.0

func (mlT *MockedLedger) GetOriginOutput() *isc.AliasOutputWithID

func (*MockedLedger) PublishTransaction added in v0.3.2

func (mlT *MockedLedger) PublishTransaction(tx *iotago.Transaction) error

func (*MockedLedger) PullLatestOutput added in v0.3.0

func (mlT *MockedLedger) PullLatestOutput(nodeID string)

func (*MockedLedger) PullStateOutputByID added in v0.3.0

func (mlT *MockedLedger) PullStateOutputByID(nodeID string, outputID iotago.OutputID)

func (*MockedLedger) PullTxInclusionState added in v0.3.0

func (mlT *MockedLedger) PullTxInclusionState(nodeID string, txID iotago.TransactionID)

func (*MockedLedger) Register added in v0.3.0

func (mlT *MockedLedger) Register(nodeID string, stateOutputHandler, outputHandler func(iotago.OutputID, iotago.Output))

func (*MockedLedger) SetPublishGovernanceTransactionAllowed added in v0.3.0

func (mlT *MockedLedger) SetPublishGovernanceTransactionAllowed(flag bool)

func (*MockedLedger) SetPublishGovernanceTransactionAllowedFun added in v0.3.0

func (mlT *MockedLedger) SetPublishGovernanceTransactionAllowedFun(fun func(tx *iotago.Transaction) bool)

func (*MockedLedger) SetPublishStateTransactionAllowed added in v0.3.0

func (mlT *MockedLedger) SetPublishStateTransactionAllowed(flag bool)

func (*MockedLedger) SetPublishStateTransactionAllowedFun added in v0.3.0

func (mlT *MockedLedger) SetPublishStateTransactionAllowedFun(fun func(tx *iotago.Transaction) bool)

func (*MockedLedger) SetPullLatestOutputAllowed added in v0.3.0

func (mlT *MockedLedger) SetPullLatestOutputAllowed(flag bool)

func (*MockedLedger) SetPullOutputByIDAllowed added in v0.3.0

func (mlT *MockedLedger) SetPullOutputByIDAllowed(flag bool)

func (*MockedLedger) SetPullOutputByIDAllowedFun added in v0.3.0

func (mlT *MockedLedger) SetPullOutputByIDAllowedFun(fun func(outputID iotago.OutputID) bool)

func (*MockedLedger) SetPullTxInclusionStateAllowed added in v0.3.0

func (mlT *MockedLedger) SetPullTxInclusionStateAllowed(flag bool)

func (*MockedLedger) SetPullTxInclusionStateAllowedFun added in v0.3.0

func (mlT *MockedLedger) SetPullTxInclusionStateAllowedFun(fun func(txID iotago.TransactionID) bool)

func (*MockedLedger) SetPushOutputToNodesNeeded added in v0.3.0

func (mlT *MockedLedger) SetPushOutputToNodesNeeded(flag bool)

func (*MockedLedger) SetPushOutputToNodesNeededFun added in v0.3.0

func (mlT *MockedLedger) SetPushOutputToNodesNeededFun(fun func(tx *iotago.Transaction, outputID iotago.OutputID, output iotago.Output) bool)

func (*MockedLedger) Unregister added in v0.3.0

func (mlT *MockedLedger) Unregister(nodeID string)

type MockedLedgers added in v0.3.0

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

func NewMockedLedgers added in v0.3.0

func NewMockedLedgers(log *logger.Logger) *MockedLedgers

func (*MockedLedgers) AttachMilestones added in v0.3.0

func (mlT *MockedLedgers) AttachMilestones(handler func(*nodebridge.Milestone)) context.CancelFunc

func (*MockedLedgers) GetLedger added in v0.3.0

func (mlT *MockedLedgers) GetLedger(chainID isc.ChainID) *MockedLedger

func (*MockedLedgers) InitLedger added in v0.3.0

func (mlT *MockedLedgers) InitLedger(stateAddress iotago.Address) isc.ChainID

func (*MockedLedgers) SetPushMilestonesToNodesNeeded added in v0.3.0

func (mlT *MockedLedgers) SetPushMilestonesToNodesNeeded(flag bool)

func (*MockedLedgers) SetPushOutputToNodesNeeded added in v0.3.0

func (mlT *MockedLedgers) SetPushOutputToNodesNeeded(flag bool)

type TestChainLedger added in v1.0.3

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

func NewTestChainLedger added in v1.0.3

func NewTestChainLedger(t *testing.T, utxoDB *utxodb.UtxoDB, originator *cryptolib.KeyPair) *TestChainLedger

func (*TestChainLedger) ChainID added in v1.0.3

func (tcl *TestChainLedger) ChainID() isc.ChainID

Only set after MakeTxChainOrigin.

func (*TestChainLedger) FakeRotationTX added in v1.0.3

func (tcl *TestChainLedger) FakeRotationTX(baseAO *isc.AliasOutputWithID, nextCommitteeAddr iotago.Address) (*isc.AliasOutputWithID, *iotago.Transaction)

func (*TestChainLedger) FakeStateTransition added in v1.0.3

func (tcl *TestChainLedger) FakeStateTransition(baseAO *isc.AliasOutputWithID, stateCommitment *state.L1Commitment) *isc.AliasOutputWithID

func (*TestChainLedger) MakeTxAccountsDeposit added in v1.0.3

func (tcl *TestChainLedger) MakeTxAccountsDeposit(account *cryptolib.KeyPair) []isc.Request

func (*TestChainLedger) MakeTxChainOrigin added in v1.0.3

func (tcl *TestChainLedger) MakeTxChainOrigin(committeeAddress iotago.Address) (*iotago.Transaction, *isc.AliasOutputWithID, isc.ChainID)

func (*TestChainLedger) MakeTxDeployIncCounterContract added in v1.0.3

func (tcl *TestChainLedger) MakeTxDeployIncCounterContract() []isc.Request

Jump to

Keyboard shortcuts

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