Documentation ¶
Index ¶
- func NextState(t *testing.T, chainKey *cryptolib.KeyPair, store state.Store, ...) (state.Block, *iotago.Transaction, iotago.OutputID)
- type MockedACSRunner
- type MockedLedger
- func (mlT *MockedLedger) GetAliasOutputByID(outputID iotago.OutputID) *iotago.AliasOutput
- func (mlT *MockedLedger) GetLatestOutput() *isc.AliasOutputWithID
- func (mlT *MockedLedger) GetOriginOutput() *isc.AliasOutputWithID
- func (mlT *MockedLedger) PublishTransaction(tx *iotago.Transaction) error
- func (mlT *MockedLedger) PullLatestOutput(nodeID string)
- func (mlT *MockedLedger) PullStateOutputByID(nodeID string, outputID iotago.OutputID)
- func (mlT *MockedLedger) PullTxInclusionState(nodeID string, txID iotago.TransactionID)
- func (mlT *MockedLedger) Register(nodeID string, ...)
- func (mlT *MockedLedger) SetPublishGovernanceTransactionAllowed(flag bool)
- func (mlT *MockedLedger) SetPublishGovernanceTransactionAllowedFun(fun func(tx *iotago.Transaction) bool)
- func (mlT *MockedLedger) SetPublishStateTransactionAllowed(flag bool)
- func (mlT *MockedLedger) SetPublishStateTransactionAllowedFun(fun func(tx *iotago.Transaction) bool)
- func (mlT *MockedLedger) SetPullLatestOutputAllowed(flag bool)
- func (mlT *MockedLedger) SetPullOutputByIDAllowed(flag bool)
- func (mlT *MockedLedger) SetPullOutputByIDAllowedFun(fun func(outputID iotago.OutputID) bool)
- func (mlT *MockedLedger) SetPullTxInclusionStateAllowed(flag bool)
- func (mlT *MockedLedger) SetPullTxInclusionStateAllowedFun(fun func(txID iotago.TransactionID) bool)
- func (mlT *MockedLedger) SetPushOutputToNodesNeeded(flag bool)
- func (mlT *MockedLedger) SetPushOutputToNodesNeededFun(...)
- func (mlT *MockedLedger) Unregister(nodeID string)
- type MockedLedgers
- func (mlT *MockedLedgers) AttachMilestones(handler func(*nodebridge.Milestone)) context.CancelFunc
- func (mlT *MockedLedgers) GetLedger(chainID isc.ChainID) *MockedLedger
- func (mlT *MockedLedgers) InitLedger(stateAddress iotago.Address) isc.ChainID
- func (mlT *MockedLedgers) SetPushMilestonesToNodesNeeded(flag bool)
- func (mlT *MockedLedgers) SetPushOutputToNodesNeeded(flag bool)
- type MockedVMRunner
- type TestChainLedger
- func (tcl *TestChainLedger) ChainID() isc.ChainID
- func (tcl *TestChainLedger) FakeRotationTX(baseAO *isc.AliasOutputWithID, nextCommitteeAddr iotago.Address) (*isc.AliasOutputWithID, *iotago.Transaction)
- func (tcl *TestChainLedger) FakeStateTransition(baseAO *isc.AliasOutputWithID, stateCommitment *state.L1Commitment) *isc.AliasOutputWithID
- func (tcl *TestChainLedger) MakeTxAccountsDeposit(account *cryptolib.KeyPair) []isc.Request
- func (tcl *TestChainLedger) MakeTxChainOrigin(committeeAddress iotago.Address) (*iotago.Transaction, *isc.AliasOutputWithID, isc.ChainID)
- func (tcl *TestChainLedger) MakeTxDeployIncCounterContract() []isc.Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
type MockedLedger ¶ added in v0.3.0
type MockedLedger struct {
// contains filtered or unexported fields
}
func NewMockedLedger ¶ added in v0.3.0
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) 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 MockedVMRunner ¶
type MockedVMRunner struct {
// contains filtered or unexported fields
}
func NewMockedVMRunner ¶
func NewMockedVMRunner(t *testing.T, log *logger.Logger) *MockedVMRunner
type TestChainLedger ¶ added in v1.0.3
type TestChainLedger struct {
// contains filtered or unexported fields
}
func NewTestChainLedger ¶ added in v1.0.3
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
Click to show internal directories.
Click to hide internal directories.